1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-26 18:06:11 +01:00
AMR/tests/testthat/test-like.R

11 lines
389 B
R
Raw Normal View History

context("like.R")
test_that("`like` works", {
expect_true(suppressWarnings("test" %like% c("^t", "^s")))
expect_true("test" %like% "test")
expect_true("test" %like% "TEST")
expect_true(as.factor("test") %like% "TEST")
expect_identical(factor(c("Test case", "Something different", "Yet another thing")) %like% c("case", "diff", "yet"),
c(TRUE, TRUE, TRUE))
})