/usr/share/doc/r-cran-rlang/tests/testthat/helper-capture.R is in r-cran-rlang 0.2.0-1.
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 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | named <- function(x) {
set_names(x, names2(x))
}
named_list <- function(...) {
named(list(...))
}
quos_list <- function(...) {
set_attrs(named_list(...), class = "quosures")
}
expect_error_ <- function(object, ...) {
expect_error(object, ...)
}
expect_warning_ <- function(object, ...) {
expect_warning(object, ...)
}
expect_identical_ <- function(object, expected, ...) {
expect_identical(object, expected, ...)
}
expect_equal_ <- function(object, expected, ...) {
expect_equal(object, expected, ...)
}
expect_no_warning <- function(object, ...) {
expect_warning(!!enquo(object), NA, ...)
}
expect_no_warning_ <- function(object, ...) {
expect_warning(object, NA, ...)
}
expect_no_error <- function(object, ...) {
expect_error(!!enquo(object), NA, ...)
}
expect_no_error_ <- function(object, ...) {
expect_error(object, NA, ...)
}
|