tests/testthat/test-vctr.R

test_that("max argument", {
  expect_snapshot({
    print(num(1:10), max = 5)
    print(char(letters), max = 10)
  })
})

test_that("max.print option", {
  local_options(max.print = 3)

  expect_snapshot({
    num(1:10)
    char(letters)
  })
})

Try the pillar package in your browser

Any scripts or data that you put into this service are public.

pillar documentation built on March 31, 2023, 10:19 p.m.