tests/testthat/test-function-leftSubstringEquals.R

test_that("leftSubstringEquals() works", {

  f <- kwb.utils:::leftSubstringEquals

  expect_error(f())
  expect_true(f("abcde", "abc"))
  expect_identical(f(c("abcde", "abdde"), "abc"), c(TRUE, FALSE))
})
KWB-R/kwb.utils documentation built on April 1, 2024, 7:12 a.m.