tests/testthat/test-code.R

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

test_that_cli("issue #154", {
  expect_snapshot({
    cli_code("a\nb\nc")
  })
})

Try the cli package in your browser

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

cli documentation built on March 31, 2023, 9:04 p.m.