diff options
author | Rob Landley <rob@landley.net> | 2019-03-14 10:32:12 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2019-03-14 10:32:12 -0500 |
commit | bf174d69cc4ae09c41d5c740af158a2cbd5b5218 (patch) | |
tree | 46527837f23fc6ef0588d8c2acb90204c5dde573 | |
parent | caa5a3b131137d1063ea466e57204b9375701499 (diff) | |
download | toybox-bf174d69cc4ae09c41d5c740af158a2cbd5b5218.tar.gz |
I had some pending grep tests I hadn't checked in too.
-rwxr-xr-x | tests/grep.test | 9 |
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 + |