aboutsummaryrefslogtreecommitdiff
path: root/tests/grep.test
diff options
context:
space:
mode:
Diffstat (limited to 'tests/grep.test')
-rwxr-xr-xtests/grep.test13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/grep.test b/tests/grep.test
index 68c8dd85..76f406c8 100755
--- a/tests/grep.test
+++ b/tests/grep.test
@@ -184,3 +184,16 @@ ln -s ../dir sub/link
testing "" "grep -rh hello sub" "" "" ""
testing "" "grep -Rh hello sub" "hello\n" "" ""
rm -rf sub real
+
+# -F multiple matches
+testing "-F multiple" "grep -F h input" "this is hello\nthis is world\n" \
+ "missing\nthis is hello\nthis is world\nmissing" ""
+testing "-Fi multiple" "grep -Fi h input" "this is HELLO\nthis is WORLD\n" \
+ "missing\nthis is HELLO\nthis is WORLD\nmissing" ""
+testing "-F empty multiple" "grep -Fi '' input" \
+ "missing\nthis is HELLO\nthis is WORLD\nmissing\n" \
+ "missing\nthis is HELLO\nthis is WORLD\nmissing" ""
+testing "-Fx" "grep -Fx h input" "h\n" \
+ "missing\nH\nthis is hello\nthis is world\nh\nmissing" ""
+testing "-Fix" "grep -Fix h input" "H\nh\n" \
+ "missing\nH\nthis is HELLO\nthis is WORLD\nh\nmissing" ""