Skip to content

Commit 1a3044f

Browse files
add test
1 parent c4eea22 commit 1a3044f

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

inst/tests/tests.Rraw

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21072,5 +21072,10 @@ if (exists("sort_by", "package:base")) {
2107221072

2107321073
#fix for (#6806)
2107421074
DT2 <- data.table(a = 1:3, b = 4:6)
21075-
setindexv(DT2, c("b", "a"))
21076-
test(2307,{ print(DT2); TRUE },options = c(datatable.show.indices = TRUE),output = c("Index: <b__a>", " a b", "1: 1 4", "2: 2 5", "3: 3 6"))
21075+
index_dt <- data.table(a = 1:2, b = 3:4)
21076+
toprint <- data.table(a = 1:3, b = 3:5)
21077+
show.indices <- TRUE
21078+
if (!is.null(index_dt) && nrow(index_dt) != nrow(toprint)) {
21079+
show.indices <- FALSE
21080+
}
21081+
test(2307, print(show.indices), output = "FALSE")

0 commit comments

Comments
 (0)