From e9dfdd76d5b4ca9d875136f085acd9001c5bfdce Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 26 Jul 2018 15:42:02 -0700 Subject: Add tests for grep with implicit/explicit BREs and explicit EREs. This is in POSIX, but pcre2grep gets it wrong (https://bugs.exim.org/show_bug.cgi?id=2294). --- tests/grep.test | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests') diff --git a/tests/grep.test b/tests/grep.test index 2a4f178b..21cd8bbb 100755 --- a/tests/grep.test +++ b/tests/grep.test @@ -143,3 +143,11 @@ rm test # match after NUL byte testing "match after NUL byte" "grep -a two" "one\0and two three\n" \ "" 'one\0and two three' + +# BREs versus EREs +testing "implicit BRE |" "grep 'uno|dos'" "uno|dos\n" \ + "" "uno\ndos\nuno|dos\n" +testing "explicit BRE |" "grep -e 'uno|dos'" "uno|dos\n" \ + "" "uno\ndos\nuno|dos\n" +testing "explicit ERE |" "grep -E 'uno|dos'" "uno\ndos\nuno|dos\n" \ + "" "uno\ndos\nuno|dos\n" -- cgit v1.2.3