diff --git a/test/assert_regex.bats b/test/assert_regex.bats index 3d5ee40..3f67d5b 100644 --- a/test/assert_regex.bats +++ b/test/assert_regex.bats @@ -51,6 +51,17 @@ pattern (1 lines): ERR_MSG } +@test "assert_regex() : newlines in the match newlines in the " { + run assert_regex $'one\ntwo' $'e\nt' + assert_test_pass + + run assert_regex $'one\ntwo' $'\nt' + assert_test_pass + + run assert_regex $'one\ntwo\n' $'o\n' + assert_test_pass +} + # Error handling @test "assert_regex() : returns 1 and displays an error message if is not a valid extended regular expression" { run assert_regex value '[.*'