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 Sept. 29, 2022, 5:13 p.m.