| 1 |
test_that("compound pillars and multiple tiers", { |
| 2 |
local_options(width = 80) |
| 3 |
|
| 4 |
x <- new_tbl(list(a = 3, b = new_tbl(list(x = 1, y = 2)))) |
| 5 |
|
| 6 |
expect_snapshot({ |
| 7 |
options(width = 15) |
| 8 |
tbl_format_setup(x, width = 30) |
| 9 |
|
| 10 |
options(width = 10) |
| 11 |
tbl_format_setup(x, width = 30) |
| 12 |
}) |
| 13 |
}) |
| 14 |
|
| 15 |
test_that("compound pillars with zero columns (#402)", { |
| 16 |
expect_snapshot({ |
| 17 |
tbl_format_setup(new_tbl(list(x = 1:2, y = matrix(integer(), ncol = 0, nrow = 2)))) |
| 18 |
|
| 19 |
tbl_format_setup(new_tbl(list(x = 1:2, y = new_tbl(list(), n = 2L)))) |
| 20 |
}) |
| 21 |
}) |