tests/testthat/test-print.R

context("printing")
test_that("print S3 method works properly", {
  expect_output(print(rex("x")), "x")

  expect_output(print(rex("x\\")), "x\\\\")

  expect_output(print(rex("x[")), "x\\\\\\[")
})

Try the rex package in your browser

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

rex documentation built on Nov. 26, 2021, 5:21 p.m.