Skip to content

Commit 32d447b

Browse files
adapt tests depending on R version
1 parent fd32945 commit 32d447b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/testthat/test-parsing.R

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,20 @@ test_that("repreated parsing solves wrong parent assignment", {
2525
})
2626

2727
test_that("long strings are parsed correctly", {
28+
if (getRversion() < "3.2") skip("skip on R < 3.2 because of parsing problems")
29+
2830
expect_warning(
2931
test_collection("parsing", "long_strings", transformer = style_text),
3032
NA
3133
)
3234
})
35+
36+
test_that("issues with parsing long strings on R 3.1 can be detected", {
37+
if (getRversion() >= "3.2") {
38+
skip("skip on R >= 3.2 because parsing probmes don't appear")
39+
}
40+
expect_error(
41+
test_collection("parsing", "long_strings", transformer = style_text),
42+
"install R .* 3.2"
43+
)
44+
})

0 commit comments

Comments
 (0)