# devtools::load_all('~/code/readtext/')
# options(error=traceback)
context("test filename extension case")
test_that("test case for txt files with glob", {
expect_equal(
length(as.character(readtext( '../data/TXTcaps/*.TXT'))),
2
)
# Expect no warning
expect_warning( readtext( '../data/TXTcaps/*.TXT'), NA)
})
test_that("test case for csv files with glob", {
expect_equal(
length(as.character(readtext(
'../data/CSVcaps/*.CSV', text_field='text'
))),
4
)
# Expect no warning
expect_warning( readtext( '../data/CSVcaps/*.CSV'), NA)
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.