diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-07 05:19:31 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2008-06-07 05:19:31 +0000 |
commit | a05c0716c256a95861c01d06b5319f3149fca33a (patch) | |
tree | 0d877b4070cd8228e19146365a7888b7305bc6ff /testsuite | |
parent | 401de648a797c5931df1ade02c26270c82c3a345 (diff) | |
download | busybox-w32-a05c0716c256a95861c01d06b5319f3149fca33a.tar.gz busybox-w32-a05c0716c256a95861c01d06b5319f3149fca33a.tar.bz2 busybox-w32-a05c0716c256a95861c01d06b5319f3149fca33a.zip |
grep: make "-f -" work (+ testsuite)
diff: small code shrink
function old new delta
grep_main 722 714 -8
diffreg 1825 1793 -32
------------------------------------------------------------------------------
(add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-40) Total: -40 bytes
Diffstat (limited to 'testsuite')
-rwxr-xr-x | testsuite/grep.tests | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/testsuite/grep.tests b/testsuite/grep.tests index 34c0fe4f7..b2de2af54 100755 --- a/testsuite/grep.tests +++ b/testsuite/grep.tests | |||
@@ -78,6 +78,10 @@ testing "grep handles multiple regexps" "grep -e one -e two input ; echo \$?" \ | |||
78 | testing "grep -F handles multiple expessions" "grep -F -e one -e two input ; echo \$?" \ | 78 | testing "grep -F handles multiple expessions" "grep -F -e one -e two input ; echo \$?" \ |
79 | "one\ntwo\n0\n" "one\ntwo\n" "" | 79 | "one\ntwo\n0\n" "one\ntwo\n" "" |
80 | 80 | ||
81 | # -f file/- | ||
82 | testing "grep can read regexps from stdin" "grep -f - input ; echo \$?" \ | ||
83 | "two\nthree\n0\n" "tw\ntwo\nthree\n" "tw.\nthr\n" | ||
84 | |||
81 | optional FEATURE_GREP_EGREP_ALIAS | 85 | optional FEATURE_GREP_EGREP_ALIAS |
82 | testing "grep -E supports extended regexps" "grep -E fo+" "foo\n" "" \ | 86 | testing "grep -E supports extended regexps" "grep -E fo+" "foo\n" "" \ |
83 | "b\ar\nfoo\nbaz" | 87 | "b\ar\nfoo\nbaz" |