tests/testthat/test-utils.R

test_that("split_in_half handles common cases", {
  out <- split_in_half(c("a-b", "a---b", "ab", "", NA), "-+", perl = TRUE)
  expect_equal(out, cbind(
    c("a", "a", "ab", "", NA),
    c("b", "b", "", "", NA)
  ))
})
rstudio/profvis documentation built on Sept. 26, 2024, 2:02 a.m.