tests/testthat/test-hyperlink.R

test_that("hyperlinks", {
  withr::local_options(crayon.hyperlink = TRUE)
  expect_equal(
    hyperlink("foo", "https://bar"),
    "\033]8;;https://bar\afoo\033]8;;\a"
  )
})

Try the crayon package in your browser

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

crayon documentation built on June 22, 2024, 9:39 a.m.