File: test-format_numeric.R

package info (click to toggle)
r-cran-pillar 1.8.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,840 kB
  • sloc: sh: 13; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 325 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
test_that("same pillar at different widths", {
  v <- 10^c(-5, -2, 3, 6)
  x <- pillar(v)
  expect_equal(get_min_width(x$data), 4)
  expect_equal(get_width(x$data), 13)
  expect_snapshot({
    pillar(v, width = 4)
    pillar(v, width = 7)
    pillar(v, width = 10)
    pillar(v, width = 15)
    pillar(v, width = 22)
  })
})