File: test-title.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 (14 lines) | stat: -rw-r--r-- 511 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
test_that("with and without title", {
  expect_snapshot({
    pillar(add_special(10^(1:6)))
    pillar(add_special(10^(1:6)), title = "crayon")
    pillar(add_special(10^(1:6)), title = "short")
    pillar(add_special(10^(1:6)), title = "somewhat_wider")
    pillar(add_special(10^(1:6)), title = "exactly_fifteen")
    pillar(add_special(10^(1:6)), title = "absolutely_breaking_all_sensible_boundaries", width = 18)
  })
})

test_that("ellipsis has width 1", {
  expect_equal(get_extent(get_ellipsis()), 1)
})