tests/testthat/test-start_of_line.R

context("test-rx_start_of_line")

test_that("start_of_line works", {

  # expect correct output
  expect_equal(rx_start_of_line() %>% as.character(), "^")

  # expect null if start_of_line isn't enabled
  expect_null(rx_start_of_line(enable = FALSE))

})

Try the RVerbalExpressions package in your browser

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

RVerbalExpressions documentation built on Nov. 6, 2019, 5:08 p.m.