Skip to content

Commit

Permalink
Fix bug and test will not fail
Browse files Browse the repository at this point in the history
  • Loading branch information
cgrandin committed Jan 6, 2024
1 parent cd4be9f commit 197da86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion R/check-yaml.R
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ check_yaml <- function(type = c("resdoc", "resdoc_pdf", "resdoc_word",
))
x_index <- names(yaml_front_matter("index.Rmd"))
.diff <- setdiff(x_skeleton, x_index)
.diff <- .diff[-tag_exceptions]
.diff <- .diff[!.diff %in% tag_exceptions]
if (length(.diff) > 0L) {
bail("Your ", fn_color("index.Rmd"), " file is missing the YAML ",
"tag(s):\n\n", tag_color(paste(.diff, collapse = "\n")))
Expand Down
4 changes: 2 additions & 2 deletions tests/testthat/test-get-set-render-type.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ test_that("get_render_type() and set_render_type() throw errors", {
writeLines(rmd, "index.Rmd")
rmd <- readLines("index.Rmd")
ind <- grep("csasdown::resdoc_pdf:", rmd)
expect_identical(ind, 45L)
expect_identical(ind, 51L)
csasdown:::set_render_type("index.Rmd", "asis")
rmd <- readLines("index.Rmd")
ind <- grep("csasdown::resdoc_pdf:", rmd)
expect_identical(ind, 45L)
expect_identical(ind, 51L)

# ---------------------------------------------------------------------------
rmd[ind] <- ""
Expand Down

0 comments on commit 197da86

Please sign in to comment.