tests/testthat/test-utils.R

test_that("non_matching", {
  chr <- "abc"
  splits <- crayon:::re_table("", chr)
  res.mx <- cbind(start=c(1L, 1L:3L), end=0L:3L, length=c(0L, 1L, 1L, 1L))
  expect_equal(crayon:::non_matching(splits, chr, empty=TRUE)[[1L]], res.mx)
  expect_equal(crayon:::non_matching(splits, chr)[[1L]], res.mx[-1L,])
})

Try the crayon package in your browser

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

crayon documentation built on June 22, 2024, 9:39 a.m.