aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/grep.test8
1 files changed, 8 insertions, 0 deletions
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"