context("Test upper and lower-casing")
test_that("Single strings can be lowercased",{
result <- rope:::string_tolower_single("FOOBARBAZ")
expect_that(result, equals("foobarbaz"))
})
test_that("Single strings can be uppercased",{
result <- rope:::string_toupper_single("foobarbaz")
expect_that(result, equals("FOOBARBAZ"))
})
test_that("Multiple strings can be lowercased",{
strings <- c("barber", "Barber", "barbeR")
result <- rope:::string_tolower_vector(strings)
expect_that(result, equals(rep("barber",3)))
})
test_that("Multiple strings can be uppercased",{
strings <- c("BArbeR", "Barber", "barbeR")
result <- rope:::string_toupper_vector(strings)
expect_that(result, equals(rep("BARBER",3)))
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.