Skip to content

Commit eb9bb87

Browse files
regression test for dup-named case
1 parent 3e99eb4 commit eb9bb87

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

inst/tests/tests.Rraw

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21320,6 +21320,9 @@ test(2321.27, as.data.table(M, keep.rownames='id'), data.table(id=c('a', 'b', 'c
2132021320
# also respect old auto-naming rules by default (to be deprecated)
2132121321
test(2321.28, names(data.table(a=1, cbind(2), c=3, 4)), c("a", "V1", "c", "V4"))
2132221322
test(2321.29, options=c(datatable.old.matrix.autoname=FALSE), names(data.table(a=1, cbind(2), c=3, 4)), c("a", "V2", "c", "V4"))
21323+
# particularly buggy old behavior: can easily result in duplicate names
21324+
test(2321.30, names(data.table(cbind(1), cbind(2))), c("V1", "V1"))
21325+
test(2321.31, options=c(datatable.old.matrix.autoname=FALSE), names(data.table(cbind(1), cbind(2))), c("V1", "V2"))
2132321326

2132421327
# New fctr() helper: like factor() but retaining order by default #4837
2132521328
test(2322.01, levels(fctr(c("b","a","c"))), c("b","a","c"))

0 commit comments

Comments
 (0)