tests/testthat/test-non-breaking-space.R

test_that("does not break", {
  testthat::local_reproducible_output(unicode = TRUE)
  expect_snapshot(local({
    withr::local_options(cli.width = 40)
    str30 <- "123456789 123456789 1234567890"
    cli_text(c(str30, "this\u00a0is\u00a0not\u00a0breaking"))
  }))
})
r-lib/cli documentation built on April 5, 2025, 7:11 p.m.