require(qrmarkdown)
require(testthat)
#debug(q.wd)
cleanlog <- function()
{
if(file.exists('testlog'))
system('rm -r testlog')
q.wd('testlog')
dir('testlog')
}
# TEST FOR Queue Root Directory
# used by interval components
test_qwd_set <- function()
{
cleanlog()
res <- q.setwd('testlog')
testthat::expect(res == 'testlog', 'incorrect path ')
# check to see default env path
Sys.setenv(QWD='testlog/newlog')
res <- q.setwd(NULL)
testthat::expect(res == 'testlog/newlog', 'incorrect path ')
# check internal directory
testthat::expect( any(dir(res) == 'inbox' ), 'incorrect path ')
}
test_qwd_set()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.