tests/testthat/test-prompt-status.R

test_that("prompt_status", {
  withr::local_options(cli.unicode = FALSE)
  expect_equal(
    prompt_status(NULL, NULL, TRUE, TRUE),
    "v > "
  )
  expect_equal(
    prompt_status(NULL, NULL, FALSE, TRUE),
    "x > "
  )
})

Try the prompt package in your browser

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

prompt documentation built on Aug. 31, 2023, 5:07 p.m.