tests/testthat/test-substitution.R

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

test_that("glue errors", {
  expect_error(cli_h1("foo { asdfasdfasdf } bar"))
  expect_error(cli_text("foo {cmd {dsfsdf()}}"))
})

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.