Skip to content

Commit

Permalink
Add test for fix of #7
Browse files Browse the repository at this point in the history
  • Loading branch information
Ian Cook committed Sep 1, 2019
1 parent 6ca50c5 commit 9f3829f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/testthat/test-secure.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ test_that("parse_expression() fails on illegal function when function also used
)
})

test_that("parse_expression() fails on illegal function called without parentheses using %>%", {
expect_error(
parse_expression("'ls' %>% system"),
"^Unrecognized"
)
})

test_that("parse_expression(secure = FALSE) does not fail on illegal function", {
expect_error(
Expand Down

0 comments on commit 9f3829f

Please sign in to comment.