Skip to content

Commit 037dc47

Browse files
missed warning test in 23
1 parent ecfed10 commit 037dc47

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.dev/gen_roxygen_tests.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ unique_tests <- unique(sub("-.*", "", all_examples))
77
# tests using 'scope = "spaces"' in test_collection()
88
tests_scope_spaces <- "15"
99

10+
warning_map <- c(`23` = '"issues/1242"')
11+
1012
for (test in unique_tests) {
1113
out_file <- file.path("tests", "testthat", paste0("test-", roxygen_stub, "-", test, ".R"))
1214
extras <- if (test %in% tests_scope_spaces) ', scope = "spaces"' else ""
@@ -15,8 +17,8 @@ for (test in unique_tests) {
1517
"",
1618
sprintf('test_that("analogous to test-%s: %s", {', roxygen_stub, test),
1719
sprintf(
18-
' expect_warning(test_collection("%s", "^%s-", transformer = style_text%s), NA)',
19-
roxygen_stub, test, extras
20+
' expect_warning(test_collection("%s", "^%s-", transformer = style_text%s), %s)',
21+
roxygen_stub, test, extras, warning_map[test]
2022
),
2123
"})",
2224
NULL
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# NB: DO NOT EDIT. Auto-generated by .dev/gen_roxygen_tests.R.
22

33
test_that("analogous to test-roxygen-examples-complete: 23", {
4-
expect_warning(test_collection("roxygen-examples-complete", "^23-", transformer = style_text), NA)
4+
expect_warning(test_collection("roxygen-examples-complete", "^23-", transformer = style_text), "issues/1242")
55
})

0 commit comments

Comments
 (0)