Skip to content

Commit cc9bf5d

Browse files
committed
add litedown mock
1 parent ea7eec4 commit cc9bf5d

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

tests/litedown.R

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
if (!suppressPackageStartupMessages(requireNamespace("litedown", quietly = TRUE))) {
2+
cat(readLines("litedown.Rout.mock", warn = FALSE), sep = "\n")
3+
q("no")
4+
}
5+
6+
# Load litedown and render the Rmd file
7+
library(litedown)
8+
litedown::reactor(comment="# ", print=xfun::record_print)
9+
invisible(litedown::fuse("litedown.Rmd", output = "litedown.md"))
10+
11+
# Print the rendered markdown content
12+
cat(readLines("litedown.md"), sep = "\n")
13+
14+
# Clean up
15+
invisible(file.remove("litedown.md"))
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
```{r test_id, message=FALSE, results="show", echo=TRUE, warning=FALSE}
1+
```{r, test_id, message=FALSE, results="show", echo=TRUE, warning=FALSE}
22
require(data.table) # print?
33
DT = data.table(x=1:3, y=4:6) # no
44
DT # yes

0 commit comments

Comments
 (0)