test_that("Test replacement of leading whitespace", {
x <- c("Hello there", " Goodbye Friend ", "\tNice to meet you", " \t What are you up to? \t \t ")
expect_equal(
replace_leading_whitespace(x),
c("Hello there", " Goodbye Friend ",
" Nice to meet you", " What are you up to? \t \t ")
)
expect_equal(
replace_leading_whitespace(x, tab=2),
c("Hello there", " Goodbye Friend ",
" Nice to meet you", " What are you up to? \t \t ")
)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.