tests/testthat/test-function-stringEndsWith.R

test_that("stringEndsWith() works", {

  expect_identical(
    stringEndsWith(c("abc", "Kabeljau", "Arabella"), "a"),
    c(FALSE, FALSE, TRUE)
  )
  
  expect_identical(
    stringEndsWith(c("abc", "Kabeljau", "Arabella"), "jau"),
    c(FALSE, TRUE, FALSE)
  )
})
KWB-R/kwb.utils documentation built on April 1, 2024, 7:12 a.m.