aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/grep.test2
-rw-r--r--tests/timeout.test1
2 files changed, 3 insertions, 0 deletions
diff --git a/tests/grep.test b/tests/grep.test
index 05288983..cd1e1fda 100755
--- a/tests/grep.test
+++ b/tests/grep.test
@@ -154,3 +154,5 @@ testing "explicit ERE |" "grep -E 'uno|dos'" "uno\ndos\nuno|dos\n" \
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" "" ""
diff --git a/tests/timeout.test b/tests/timeout.test
index 5ca7cc90..189b592a 100644
--- a/tests/timeout.test
+++ b/tests/timeout.test
@@ -7,6 +7,7 @@
# timeout's exit value is complicated!
testcmd "times out" '.1 sleep 100 ; echo $?' '124\n' '' ''
testcmd "failure" '-s MONKEY .1 sleep 100 2>/dev/null ; echo $?' '125\n' '' ''
+testcmd "early failure" '2>/dev/null ; echo $?' '125\n' '' ''
testcmd "can't execute" '.1 / 2>/dev/null ; echo $?' '126\n' '' ''
testcmd "can't find" '.1 /does/not/exist 2>/dev/null ; echo $?' '127\n' '' ''
testcmd "custom signal" '-s 3 .1 sleep 100; echo $?' '124\n' '' ''