Skip to content

Commit d21225b

Browse files
committed
..
1 parent 61368bf commit d21225b

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

inst/tests/tests.Rraw

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21777,11 +21777,11 @@ test(2377.91, truelength(dt$a), 0L)
2177721777
test(2377.92, {setallocrow(dt); truelength(dt$a)}, 3L)
2177821778

2177921779
#6663 Option to print the number of columns
21780-
test(2377.1, capture.output(print(as.data.table(iris)))[1L], "Number of columns: 5", options=list(datatable.show.ncols=TRUE))
21781-
test(2377.2, any(grepl("^Number of columns: 5$", capture.output(print(setkey(as.data.table(iris), Sepal.Length))))), TRUE, options=list(datatable.show.ncols=TRUE))
21782-
test(2377.3, any(grepl("^[0-9]+ variables? not shown", capture.output(print(data.table(a=1:3, b=1:3, c=1:3, d=1:3, e=1:3), trunc.cols=TRUE)))), FALSE, options=list(width=20, datatable.show.ncols=TRUE))
21783-
test(2377.4, capture.output(print(as.data.table(iris), trunc.cols=TRUE))[1L], "Number of columns: 5, of which 5 are not shown: [Sepal.Length, Sepal.Width, Petal.Length, Petal.Width, Species]", options=list(width=10, datatable.show.ncols=TRUE))
21784-
test(2377.5, any(grepl("^Number of columns:", capture.output(print(as.data.table(iris))))), FALSE, options=list(datatable.show.ncols=FALSE))
21785-
test(2377.6, capture.output(print(as.data.table(iris), trunc.cols=TRUE, class=TRUE))[1L], "Number of columns: 5, of which 5 are not shown: [Sepal.Length <num>, Sepal.Width <num>, Petal.Length <num>, Petal.Width <num>, Species <fctr>]", options=list(width=10, datatable.show.ncols=TRUE))
21786-
test(2377.7, { dt = data.table(matrix(1:200, nrow=25)); out = capture.output(print(dt, trunc.cols=TRUE, class=TRUE)); grepl("<int>", out[length(out)]) }, TRUE, options=list(width=30, datatable.show.ncols=TRUE))
21787-
test(2377.8, any(grepl("variable", capture.output(print(data.table(a=1), trunc.cols=TRUE)))), FALSE, options=list(width=80, datatable.show.ncols=FALSE))
21780+
test(2378.1, capture.output(print(as.data.table(iris)))[1L], "Number of columns: 5", options=list(datatable.show.ncols=TRUE))
21781+
test(2378.2, any(grepl("^Number of columns: 5$", capture.output(print(setkey(as.data.table(iris), Sepal.Length))))), TRUE, options=list(datatable.show.ncols=TRUE))
21782+
test(2378.3, any(grepl("^[0-9]+ variables? not shown", capture.output(print(data.table(a=1:3, b=1:3, c=1:3, d=1:3, e=1:3), trunc.cols=TRUE)))), FALSE, options=list(width=20, datatable.show.ncols=TRUE))
21783+
test(2378.4, capture.output(print(as.data.table(iris), trunc.cols=TRUE))[1L], "Number of columns: 5, of which 5 are not shown: [Sepal.Length, Sepal.Width, Petal.Length, Petal.Width, Species]", options=list(width=10, datatable.show.ncols=TRUE))
21784+
test(2378.5, any(grepl("^Number of columns:", capture.output(print(as.data.table(iris))))), FALSE, options=list(datatable.show.ncols=FALSE))
21785+
test(2378.6, capture.output(print(as.data.table(iris), trunc.cols=TRUE, class=TRUE))[1L], "Number of columns: 5, of which 5 are not shown: [Sepal.Length <num>, Sepal.Width <num>, Petal.Length <num>, Petal.Width <num>, Species <fctr>]", options=list(width=10, datatable.show.ncols=TRUE))
21786+
test(2378.7, { dt = data.table(matrix(1:200, nrow=25)); out = capture.output(print(dt, trunc.cols=TRUE, class=TRUE)); grepl("<int>", out[length(out)]) }, TRUE, options=list(width=30, datatable.show.ncols=TRUE))
21787+
test(2378.8, any(grepl("variable", capture.output(print(data.table(a=1), trunc.cols=TRUE)))), FALSE, options=list(width=80, datatable.show.ncols=FALSE))

0 commit comments

Comments
 (0)