Skip to content

Commit

Permalink
adapt tests depending on R version
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzwalthert committed Apr 6, 2018
1 parent 1eb21a4 commit 5dab0a3
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/testthat/test-parsing.R
Expand Up @@ -25,8 +25,20 @@ test_that("repreated parsing solves wrong parent assignment", {
})

test_that("long strings are parsed correctly", {
if (getRversion() < "3.2") skip("skip on R < 3.2 because of parsing problems")

expect_warning(
test_collection("parsing", "long_strings", transformer = style_text),
NA
)
})

test_that("issues with parsing long strings on R 3.1 can be detected", {
if (getRversion() >= "3.2") {
skip("skip on R >= 3.2 because parsing probmes don't appear")
}
expect_error(
test_collection("parsing", "long_strings", transformer = style_text),
"install R .* 3.2"
)
})

0 comments on commit 5dab0a3

Please sign in to comment.