Skip to content

Commit e3ec68a

Browse files
authored
even more future proof if someone wants to add NSE (#7441)
1 parent 760d29e commit e3ec68a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

inst/tests/programming.Rraw

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,3 +616,10 @@ test(202.2, f(dt, params=jpar), data.table(y=2:1))
616616
"." = function(...) list(.j=list("x"))
617617
test(202.3, dt[, .j, env=.(.j=list("y"))], data.table(x=1:2))
618618
rm(list=".")
619+
x = 2L ## no NSE, tests explicitly : ! -
620+
y = 2L
621+
test(202.4, dt[, .j, env = list(.j = x:y)], data.table(y=2:1))
622+
col = "x"
623+
test(202.5, dt[, .j, env = list(.j = !col)], error = "invalid argument type")
624+
test(202.6, dt[, .j, env = list(.j = -col)], error = "invalid argument to unary operator")
625+
rm(x, y, col)

0 commit comments

Comments
 (0)