inst/unitTests/test_knitr.R

library(knitr)

test_knitr = function(){

  #write to testRmd.html
  rmarkdown::render(system.file("examples/testRmd.Rmd", package="ReportingTools"), output_dir = "./")
  checkTrue(file.exists("testRmd.html"))
  lines = readLines("testRmd.html")
  checkTrue(length(lines)
  checkTrue(length(grep("Using ReportingTools", lines)) == 1)
}
JasonHackney/ReportingTools documentation built on Oct. 23, 2023, 9:24 p.m.