tests/testthat/test-tidyWords.R

test_that("trailing spaces", {
  expect_equal(tidyWords("abc"), tidyWords(" abc "))
})
test_that("hyphens", {
  expect_equal(tidyWords("ab c"), tidyWords("ab-c"))
})
test_that("capitalisation", {
  expect_equal(tidyWords("AbC"), tidyWords("abc"))
})

Try the CodelistGenerator package in your browser

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

CodelistGenerator documentation built on Oct. 17, 2024, 5:09 p.m.