/usr/share/doc/r-cran-dplyr/tests/testthat/test-overscope.R is in r-cran-dplyr 0.7.4-3.
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 | context("overscope")
test_that(".data has strict matching semantics (#2591)", {
expect_error(
data_frame(a = 1) %>% mutate(c = .data$b),
"Column `b`: not found in data"
)
expect_error(
data_frame(a = 1:3) %>% group_by(a) %>% mutate(c = .data$b),
"Column `b`: not found in data"
)
})
|