tests/testthat/test-capitalize.R

test_that("Vectorized", {
    object <- c(
        "the quick Brown fox",
        "using AIC for model selection",
        "NASA"
    )
    expect_identical(
        object = capitalize(object, strict = FALSE),
        expected = c(
            "The Quick Brown Fox",
            "Using AIC For Model Selection",
            "NASA"
        )
    )
    expect_identical(
        object = capitalize(object, strict = TRUE),
        expected = c(
            "The Quick Brown Fox",
            "Using Aic For Model Selection",
            "Nasa"
        )
    )
})
acidgenomics/r-syntactic documentation built on Oct. 30, 2023, 3:08 a.m.