diff --git a/tests/testthat/test-hook-codemeta-description-updated.R b/tests/testthat/test-hook-codemeta-description-updated.R index bf1e5828e..d3b86fb9a 100644 --- a/tests/testthat/test-hook-codemeta-description-updated.R +++ b/tests/testthat/test-hook-codemeta-description-updated.R @@ -2,7 +2,6 @@ run_test("codemeta-description-update", file_name = c("codemeta.json"), suffix = "", std_out = "No `DESCRIPTION` found in repository.", - std_err = "", expect_success = FALSE, read_only = TRUE, ) @@ -11,20 +10,16 @@ run_test("codemeta-description-update", file_name = c("DESCRIPTION"), suffix = "", std_out = "No `codemeta.json` found in repository.", - std_err = "", - # voluntary expect_success = FALSE, read_only = TRUE ) - # outdated run_test("codemeta-description-update", file_name = c("DESCRIPTION", "codemeta.json"), suffix = "", - std_err = "", - expect_success = FALSE, std_out = "out of date", + expect_success = FALSE, file_transformer = function(files) { if (length(files) > 1) { # transformer is called once on all files and once per file @@ -33,7 +28,7 @@ run_test("codemeta-description-update", writeLines(content_2, files[1]) } files - } + }, ) # succeed @@ -48,7 +43,9 @@ run_test("codemeta-description-update", writeLines(content_2, files[2]) } files - } + }, + expect_success = TRUE, + read_only = TRUE ) if (!on_cran()) { @@ -68,7 +65,9 @@ if (!on_cran()) { writeLines(content_2, files[2]) } files - } + }, + expect_success = TRUE, + read_only = TRUE ) # # fail in wrong root @@ -79,7 +78,7 @@ if (!on_cran()) { "rpkg2/codemeta.json" = "README.md" ), cmd_args = "--root=rpkg2", - std_err = "No `DESCRIPTION` found in repository.", + std_out = "No `DESCRIPTION` found in repository.", suffix = "", file_transformer = function(files) { if (length(files) > 1) { @@ -89,6 +88,8 @@ if (!on_cran()) { writeLines(content_2, files[2]) } files - } + }, + expect_success = FALSE, + read_only = TRUE ) }