tests/testthat/helper-functions.R

check_code   = function(test_code){
  tcres = tryCatch(
    { 
      invisible(
        capture.output(
          suppressWarnings(
            suppressMessages(source(test_code))
            )
          )
        )
      list(isgood = TRUE)},
    error = function(e) {
      list(isgood=FALSE, error=e)})
  tcres}
john-harrold/ubiquity documentation built on March 13, 2024, 2:58 a.m.