test_that("str_split_camel_case()` works", {
expect_equal(
str_split_camel_case(c(
"RoryNolan", "NaomiFlagg",
"DepartmentOfSillyHats"
)),
list(
c("Rory", "Nolan"), c("Naomi", "Flagg"),
c("Department", "Of", "Silly", "Hats")
)
)
expect_equal(
str_split_camel_case(
c(
"RoryNolan", "NaomiFlagg",
"DepartmentOfSillyHats"
),
lower = TRUE
),
list(
c("Rory", "Nolan"), c("Naomi", "Flagg"),
c("Department", "Of", "Silly", "Hats")
) %>%
lapply(str_to_lower)
)
expect_equal(str_split_camel_case(character()), list())
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.