aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/grep.test9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/grep.test b/tests/grep.test
index cd1e1fda..798a9c6a 100755
--- a/tests/grep.test
+++ b/tests/grep.test
@@ -156,3 +156,12 @@ testing "" "grep -o -e iss -e ipp" "iss\niss\nipp\n" "" "mississippi"
testing "" "grep -o -e gum -e rgu" "rgu\n" "" "argument"
testing "early failure" 'grep --what 2>/dev/null || echo $?' "2\n" "" ""
+
+testing "" 'grep abc ; echo $?' "abcdef\n0\n" "" "abcdef\n"
+testing "" 'grep abc doesnotexist input 2>/dev/null; echo $?' \
+ "input:abcdef\n2\n" "abcdef\n" ""
+mkdir sub
+ln -s nope sub/link
+testing "" 'grep -r walrus sub 2>/dev/null; echo $?' "1\n" "" ""
+rm -rf sub
+