Skip to content

Commit 5383d55

Browse files
another one
1 parent 436e410 commit 5383d55

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

inst/tests/tests.Rraw

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21369,19 +21369,20 @@ test(2328.2, droplevels(DT), data.table(f=factor(), i=integer(), f2=factor()))
2136921369
# '..1' is ...elt(1), not a variable named '1', when doing "up-a-level" search (#5460)
2137021370
DT = data.table(a=1.0)
2137121371
sqrt_dot_sym = function(...) sqrt(..1)
21372-
test(2329.1, lapply(DT, function(...) sqrt(..1)), list(a=1.0))
21373-
test(2329.2, lapply(DT, sqrt_dot_sym), list(a=1.0))
21374-
test(2329.3, DT[, lapply(.SD, function(...) sqrt(..1))], data.table(a=1.0))
21375-
test(2329.4, DT[, lapply(.SD, sqrt_dot_sym)], data.table(a=1.0))
21372+
test(2329.01, lapply(DT, function(...) sqrt(..1)), list(a=1.0))
21373+
test(2329.02, lapply(DT, sqrt_dot_sym), list(a=1.0))
21374+
test(2329.03, DT[, lapply(.SD, function(...) sqrt(..1))], data.table(a=1.0))
21375+
test(2329.04, DT[, lapply(.SD, sqrt_dot_sym)], data.table(a=1.0))
2137621376
sqrt_elt_sym = function(...) sqrt(...elt(1))
2137721377
# TODO(R>=3.5.0): run this unconditionally
2137821378
if (!inherits(tryCatch(sqrt_elt_sym(1), error=identity), "error")) {
21379-
test(2329.5, lapply(DT, sqrt_elt_sym), list(a=1.0))
21380-
test(2329.6, lapply(DT, function(...) sqrt(...elt(1L))), list(a=1.0))
21381-
test(2329.7, DT[, lapply(.SD, sqrt_elt_sym)], data.table(a=1.0))
21382-
test(2329.8, DT[, lapply(.SD, function(...) sqrt(...elt(1L)))], data.table(a=1.0))
21379+
test(2329.05, lapply(DT, sqrt_elt_sym), list(a=1.0))
21380+
test(2329.06, lapply(DT, function(...) sqrt(...elt(1L))), list(a=1.0))
21381+
test(2329.07, DT[, lapply(.SD, sqrt_elt_sym)], data.table(a=1.0))
21382+
test(2329.08, DT[, lapply(.SD, function(...) sqrt(...elt(1L)))], data.table(a=1.0))
2138321383
}
2138421384
# edge case of weird, though technically valid, names
21385-
`.123` = 'a'
21385+
`.123` = ...123 = 'a'
2138621386
DT = data.table(a = 4L)
21387-
test(2329.9, DT[, ...123], DT) # _not_ '..N' style and distinct from '...'
21387+
test(2329.09, DT[, ...123], DT) # _not_ '..N' style and distinct from '...'
21388+
test(2329.10, DT[, .....123], DT)

0 commit comments

Comments
 (0)