tests/testthat/test-function-matches_string.R

test_that("matches_string() works", {

  f <- kwb.code:::matches_string
  
  expect_error(f())

  result <- f("a")
  
  expect_true(result)
  expect_identical(attr(result, "name"), "a")
  
  expect_false(f(1))
})
KWB-R/kwb.code documentation built on July 28, 2023, 5:57 p.m.