File: test-utils.R

package info (click to toggle)
r-cran-profvis 0.4.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 868 kB
  • sloc: javascript: 1,943; ansic: 41; sh: 13; makefile: 8
file content (7 lines) | stat: -rw-r--r-- 219 bytes parent folder | download
1
2
3
4
5
6
7
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)
  ))
})