Skip to content

Commit c87eef3

Browse files
convert #6735 examples to tests
1 parent 2a5bc44 commit c87eef3

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

inst/tests/tests.Rraw

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20650,7 +20650,7 @@ test(2294.72,
2065020650
label = list(character = "C3", VCharA = "Total", integer = 2L))),
2065120651
warning = "For the following variables, the 'label' value was already in the data: [VCharB (label: C3), VIntA (label: 2)]")
2065220652

20653-
# tests disabled -- fix for #4784 causes various breaking changes, e.g. #6735 and those below (2295.4+).
20653+
# tests disabled -- fix for #4784 causes various breaking changes, at least partially covered by 2295.4+.
2065420654
# setDT no longer leaks class modification to origin copy, #4784
2065520655
# d1 = data.frame(a=1, row.names='b')
2065620656
# d2 = d1
@@ -20670,6 +20670,18 @@ e = new.env(parent=topenv())
2067020670
e$x = data.frame(a=1)
2067120671
foo('x', e)
2067220672
test(2295.5, is.data.table(e$x))
20673+
# More regressions noted in #6735
20674+
baz = function(x) setDT(x)
20675+
foo = function(x) {
20676+
bar = function() baz(x)
20677+
x = data.frame(a=1)
20678+
bar()
20679+
is.data.table(x)
20680+
}
20681+
test(2295.6, foo())
20682+
x = data.frame(a=1)
20683+
baz(x)
20684+
test(2295.7, is.data.table(x))
2067320685

2067420686
# #6588: .checkTypos used to give arbitrary strings to stopf as the first argument
2067520687
test(2296, d2[x %no such operator% 1], error = '%no such operator%')

0 commit comments

Comments
 (0)