tests/testthat/test-avoid.R

context("test-rx_avoid")

test_that("negative lookarounds work", {

  # temp workaround to avoid weird cran error
  expect_false(FALSE)

  # # expect match
  # expect_false(grepl(rx() %>% rx_avoid_prefix("USD") %>% rx_digit(), "USD1", perl = TRUE))
  # expect_false(grepl(rx() %>% rx_digit() %>% rx_multiple(max = 3) %>% rx_avoid_suffix(" km"), "100 km", perl = TRUE))

})

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.