expect_match("Testing is fun", "fun")
expect_match("Testing is fun", "f.n")
expect_no_match("Testing is fun", "horrible")
show_failure(expect_match("Testing is fun", "horrible"))
show_failure(expect_match("Testing is fun", "horrible", fixed = TRUE))
# Zero-length inputs always fail
show_failure(expect_match(character(), "."))
Run the code above in your browser using DataLab