aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-03-14 10:32:12 -0500
committerRob Landley <rob@landley.net>2019-03-14 10:32:12 -0500
commitbf174d69cc4ae09c41d5c740af158a2cbd5b5218 (patch)
tree46527837f23fc6ef0588d8c2acb90204c5dde573 /tests
parentcaa5a3b131137d1063ea466e57204b9375701499 (diff)
downloadtoybox-bf174d69cc4ae09c41d5c740af158a2cbd5b5218.tar.gz
I had some pending grep tests I hadn't checked in too.
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
+