File: test-verbatim.R

package info (click to toggle)
r-cran-cli 3.6.4-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,288 kB
  • sloc: ansic: 16,412; cpp: 37; sh: 13; makefile: 2
file content (15 lines) | stat: -rw-r--r-- 346 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

start_app()
on.exit(stop_app(), add = TRUE)

test_that("verbatim text is correctly styled", {
  expect_snapshot(local({
    theme <- list(.padded = list("margin-left" = 4))
    cli_div(class = "padded", theme = theme)

    lines <- c("first", "second", "third")

    cli_verbatim(lines)
    cli_verbatim(paste0(lines, collapse = "\n"))
  }))
})