Skip to content

Commit

Permalink
Update test-namespace.R (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmbarbone committed Nov 27, 2023
1 parent fa4f722 commit e4bd2bb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/testthat/test-namespace.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,11 @@ test_that("require_namespace", {
regexp = "2foo",
fixed = TRUE
))

expect_error(require_namespace("base>1.0"), NA)
expect_error(require_namespace("utils>=1.0"), NA)
expect_error(require_namespace("utils>1.0"), NA)
expect_error(require_namespace(paste0("utils==", getRversion())), NA)
expect_error(require_namespace("utils<1.0"), class = "namespaceVersionError")
expect_error(require_namespace("utils<=1.0"), class = "namespaceVersionError")
})

0 comments on commit e4bd2bb

Please sign in to comment.