tests/testthat/test-strClean.R

test_that("cleaning string", {
  expect_equal(feR::strClean("Ábcdêãçoàúü_a", upper=FALSE), "Abcdeacoauu_a")
  expect_equal(feR::strClean("Ábcdêãçoàúü_a", upper=TRUE), "ABCDEACOAUU_A")
  expect_equal(feR::strClean("Ábcdêãçoàúü_a"), "Abcdeacoauu_a")
  expect_equal(feR::strClean("VAR(1)"), "VAR_1")
  expect_equal(feR::strClean("Ábcdêãçoàúü_a__ _", upper=FALSE), "Abcdeacoauu_a")

})
feranpre/feR documentation built on Nov. 22, 2022, 2:29 a.m.