Skip to content

Commit 405d693

Browse files
committed
..
1 parent 04cf5ff commit 405d693

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

inst/tests/tests.Rraw

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21455,10 +21455,10 @@ test(2331.4, local({
2145521455
identical(out, "dt")
2145621456
}))
2145721457
test(2331.5, local({
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
21458+
cycle <- list()
21459+
cycle[[1]] <- cycle
21460+
cycle[[2]] <- list(cycle) # nested cycle
21461+
cycle[[3]] <- data.table(x = 1)
21462+
res <- tables(recursive = TRUE)$NAME
21463+
"cycle[[3]]" %in% res && all(!grepl("cycle\\[\\[1\\]\\]", res)) && all(!grepl("cycle\\[\\[2\\]", res))
2146421464
}))

0 commit comments

Comments
 (0)