tests/testthat/helper-capture_output.R

if (utils::packageVersion("testthat") <= "1.0.2") {
    capture_output <- function(code, print = FALSE, width = 80) {
        oldwidth <- getOption("width")
        if (width != oldwidth) {
            options(width = width)
            on.exit(options(width = oldwidth), add = TRUE)
        }
        testthat::capture_output(code, print)
    }
}

Try the corpus package in your browser

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

corpus documentation built on May 2, 2021, 9:06 a.m.