inst/tinytest/test_utils.R

expect_silent(
  current = catalog:::check_character_one("hello")
)

expect_error(
  current = catalog:::check_character_one(1),
  pattern = "is.character\\(x = x\\) is not TRUE"
)

expect_error(
  current = catalog:::check_character_one(c("hello", "world")),
  pattern = "length\\(x = x\\) == 1L is not TRUE"
)

Try the catalog package in your browser

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

catalog documentation built on Aug. 23, 2022, 1:07 a.m.