tests/testthat/test_tmpl.R

test_that("Template", {
  expect_error(template.e("whoops"))

  template.e("whoops %s")
  template.w("careful %s")

  err <- e("Argh")
  war <- w("Careful")

  testthat::expect_snapshot_output(err)
  testthat::expect_snapshot_output(war)

  template.e()
  template.w()
})

Try the erratum package in your browser

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

erratum documentation built on Jan. 4, 2022, 1:08 a.m.