Skip to content

Commit

Permalink
more unit tests in #232
Browse files Browse the repository at this point in the history
  • Loading branch information
gagolews committed Feb 8, 2019
1 parent 1fcf565 commit 367ef53
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions devel/testthat/test-detect-fixed.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,9 @@ test_that("stri_detect_fixed", {
expect_identical(stri_detect_fixed(c("", "def", "123", "ghi", "456", "789", "jkl"),
c("abc", "def", "XXX", "ghi", "456", "789", "jkl"),
negate=TRUE, max_count=2), c(TRUE, FALSE, TRUE, NA, NA, NA, NA))

expect_identical(stri_detect_regex(c("aaa", "bbb", "ccc"), "bbb", max_count=1),
c(FALSE, TRUE, NA))
expect_identical(stri_detect_regex(c("aaa", "bbb", "ccc"), "ddd", max_count=1),
c(FALSE, FALSE, FALSE))
})

0 comments on commit 367ef53

Please sign in to comment.