Skip to content

Commit

Permalink
Need to skip some tests w/o pandoc
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborcsardi committed Mar 17, 2024
1 parent 518d65e commit 5726092
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/testthat/test-build.R
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ test_that("warnings can be turned into errors", {
})

test_that("Config/build/clean-inst-doc FALSE", {
if (Sys.which("pandoc")) skip("No pandoc")
dest <- withr::local_tempdir()
expect_silent(
build(
Expand All @@ -221,6 +222,7 @@ test_that("Config/build/clean-inst-doc FALSE", {
clean_doc = NULL
)
)

pkg <- file.path(dest, dir(dest))
expect_true(length(pkg) == 1)
expect_true(file.exists(pkg))
Expand All @@ -230,6 +232,7 @@ test_that("Config/build/clean-inst-doc FALSE", {
})

test_that("Config/build/clean-inst-doc TRUE", {
if (Sys.which("pandoc")) skip("No pandoc")
src <- withr::local_tempdir()
dest <- withr::local_tempdir()
file.copy(test_path("testInstDoc"), src, recursive = TRUE)
Expand Down

0 comments on commit 5726092

Please sign in to comment.