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 = "")
}

Try the progress package in your browser

Any scripts or data that you put into this service are public.

progress documentation built on May 17, 2019, 1:02 a.m.