Skip to content

Commit 04cf5ff

Browse files
committed
added test for uncovered line
1 parent 4f5ee7f commit 04cf5ff

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

inst/tests/tests.Rraw

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21455,8 +21455,10 @@ test(2331.4, local({
2145521455
identical(out, "dt")
2145621456
}))
2145721457
test(2331.5, local({
21458-
shared <- list(dt = data.table(x = 1))
21459-
repeated <- list(shared, shared) # same list object appears twice
21460-
out <- tables(recursive = TRUE)$NAME
21461-
identical(out, "repeated[[1]]$dt") # only the first should be processed
21458+
dt <- data.table(x = 1)
21459+
e <- new.env()
21460+
e$dt <- dt
21461+
e$self <- e # actual cycle
21462+
out <- tables(recursive = TRUE, env = e)$NAME
21463+
identical(out, "dt") # should only find 'dt', not 'self$dt' or worse
2146221464
}))

0 commit comments

Comments
 (0)