
matches(regexp, all = TRUE) expect_match(object, regexp, all = TRUE, info = NULL,
label = NULL)
regexp
(TRUE), or does only one need to match
(FALSE)NULL
, computed
from deparsed object.str_detect
for the function that
powers the string matching Other expectations: equals
,
expect_equal
,
expect_equivalent
,
expect_error
, expect_false
,
expect_identical
, expect_is
,
expect_message
,
expect_output
, expect_true
,
expect_warning
,
gives_warning
, is_a
,
is_equivalent_to
, is_false
,
is_identical_to
, is_true
,
prints_text
, shows_message
,
takes_less_than
, throws_error
expect_that("Testing is fun", matches("fun"))
expect_that("Testing is fun", matches("f.n"))
expect_match("Testing is fun", "f.n")
Run the code above in your browser using DataLab