tests/testthat/test-run-examples.R

test_that("Can run an example", {
  pkg <- "testHelp"
  expect_output(
    suppressMessages(run_examples(pkg = pkg, document = FALSE)),
    "You called foofoo.",
    fixed = TRUE
  )
})

Try the devtools package in your browser

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

devtools documentation built on Oct. 12, 2022, 1:06 a.m.