Skip to content

Commit 84ffc35

Browse files
test that key is wiped from duplicates
1 parent bcccb59 commit 84ffc35

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

inst/tests/mergelist.Rraw

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ test(12.06, cbindlist(list(data.table(), data.table(a=1:2), data.table(b=1:2))),
3939
test(12.07, cbindlist(list(data.table(), data.table(a=1:2), list(b=1:2))), data.table(a=1:2, b=1:2))
4040
test(12.08, cbindlist(list(data.table(a=integer()), list(b=integer()))), data.table(a=integer(), b=integer()))
4141
## duplicated names
42-
test(12.09, cbindlist(list(data.table(a=1L, b=2L), data.table(b=3L, d=4L))), data.table(a=1L, b=2L, b=3L, d=4L))
42+
test(12.09, cbindlist(list(data.table(a=1L, b=2L, key="b"), data.table(b=3L, d=4L))), data.table(a=1L, b=2L, b=3L, d=4L)) # key is wiped
4343
local({
4444
ans = cbindlist(list(setindexv(data.table(a=2:1, b=1:2), "a"), data.table(a=1:2, b=2:1, key="a"), data.table(a=2:1, b=1:2)))
4545
test(12.10, ans, data.table(a=2:1, b=1:2, a=1:2, b=2:1, a=2:1, b=1:2))

0 commit comments

Comments
 (0)