Skip to content

Commit

Permalink
fix unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
statnmap committed Nov 15, 2021
1 parent 7a03620 commit 4f1a565
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion tests/testthat/test-to-description.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,30 @@ test_that("fails if dir.t do not exists", {
dir.r = c("R", "rara")),
regexp = "There is no directory named: rara")

expect_error(
att_amend_desc(path = dummypackage,
dir.r = "rara"), # do not exist, nothing fails
regexp = NA)

expect_message(
att_amend_desc(path = dummypackage,
dir.v = c("vignettes", "vava")),
regexp = "There is no directory named: vava")

expect_error(
att_amend_desc(path = dummypackage,
dir.v = "vava"), # do not exist, nothing fails
regexp = NA)

expect_message(
att_amend_desc(path = dummypackage,
dir.v = c("tests", "tata")),
dir.t = c("tests", "tata")),
regexp = "There is no directory named: tata")

expect_error(
att_amend_desc(path = dummypackage,
dir.t = "tata"), # do not exist, nothing fails
regexp = NA)
})
unlink(dummypackage, recursive = TRUE)

Expand Down

0 comments on commit 4f1a565

Please sign in to comment.