inst/tinytest/test_string2words.R

if (interactive()) {
    pkgload::load_all()
    library("tinytest")
}

expectation <- "beech, oak and ash"
result <- string2words(c("beech", "oak", "ash"))
expect_identical(result, expectation)
expectation <- "beech,oakandash"
result <- string2words(c("beech", "oak", "ash"), add_whitespace = FALSE)
expect_identical(result, expectation)

Try the fritools package in your browser

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

fritools documentation built on June 8, 2025, 11:59 a.m.