/usr/share/doc/r-cran-tibble/tests/testthat/test-lst.R is in r-cran-tibble 1.4.1-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | context("lst")
test_that("lst handles named and unnamed NULL arguments", {
expect_equivalent(lst(NULL), list("NULL" = NULL))
expect_identical(lst(a = NULL), list(a = NULL))
expect_identical(
lst(NULL, b = NULL, 1:3),
list("NULL" = NULL, b = NULL, "1:3" = 1:3)
)
})
test_that("lst handles internal references", {
expect_identical(lst(a = 1, b = a), list(a = 1, b = 1))
expect_identical(lst(a = NULL, b = a), list(a = NULL, b = NULL))
})
test_that("lst supports duplicate names (#291)", {
expect_identical(lst(a = 1, a = a + 1, b = a), list(a = 1, a = 2, b = 2))
expect_identical(lst(b = 1, a = b, a = b + 1, b = a), list(b = 1, a = 1, a = 2, b = 2))
})
|