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))

})
VerbalExpressions/RVerbalExpressions documentation built on March 27, 2024, 8:20 a.m.