tests/testthat/helper.R

get_output <- function(expr) {
  msgs <- character()
  i <- 0
  suppressMessages(withCallingHandlers(
    expr,
    message = function(e) msgs[[i <<- i + 1]] <<- conditionMessage(e)))
  paste0(msgs, collapse = "")
}
tsengtiger/progress_tiger documentation built on Dec. 23, 2021, 12:57 p.m.