tests/testthat/test-format_integer.R

test_that("integer output will use scientific if necessary", {
  x <- 10000000L + 1:3
  expect_snapshot({
    pillar(add_special(x), width = 6)
    pillar(add_special(x), width = 7)
    pillar(add_special(x), width = 8)
    pillar(add_special(x), width = 9)
  })
})
r-lib/pillar documentation built on June 15, 2025, 3:36 a.m.