tests/testthat/test-sanitize.R

context("test-sanitize")

test_that("sanitize utility works", {

  # expect escape
  expect_equal(sanitize("["), "\\[")

  # expect escape
  expect_equal(sanitize("\\[|+$"), "\\\\\\[\\|\\+\\$")

})

Try the RVerbalExpressions package in your browser

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

RVerbalExpressions documentation built on May 29, 2024, 6:47 a.m.