feat(local): metadata-only ABI triage helper
This commit is contained in:
parent
d328f261d2
commit
dbf26d7786
1 changed files with 38 additions and 0 deletions
16
local/tests/test-r-minor-helpers.R
Normal file
16
local/tests/test-r-minor-helpers.R
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
source(file.path("..", "r-minor-helpers.R"))
|
||||
|
||||
test_that("pure-r (NeedsCompilation != yes) is not sensitive", {
|
||||
expect_identical(classify_from_metadata("no", NA, c("Rcpp")), "not-sensitive")
|
||||
expect_identical(classify_from_metadata("", "Rcpp", c("Rcpp")), "not-sensitive")
|
||||
})
|
||||
|
||||
test_that("LinkingTo a risky dep is sensitive (version constraints stripped)", {
|
||||
expect_identical(classify_from_metadata("yes", "Rcpp (>= 1.0)", c("Rcpp")), "sensitive")
|
||||
expect_identical(classify_from_metadata("yes", "R6,\n cpp11", c("Rcpp", "cpp11")), "sensitive")
|
||||
})
|
||||
|
||||
test_that("compiled but no risky LinkingTo is ambiguous (needs source)", {
|
||||
expect_identical(classify_from_metadata("yes", "R6", c("Rcpp", "cpp11")), "ambiguous")
|
||||
expect_identical(classify_from_metadata("yes", NA, c("Rcpp")), "ambiguous")
|
||||
})
|
||||
Loading…
Reference in a new issue