From a05c0716c256a95861c01d06b5319f3149fca33a Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Sat, 7 Jun 2008 05:19:31 +0000 Subject: 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 --- testsuite/grep.tests | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'testsuite') 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 \$?" \ testing "grep -F handles multiple expessions" "grep -F -e one -e two input ; echo \$?" \ "one\ntwo\n0\n" "one\ntwo\n" "" +# -f file/- +testing "grep can read regexps from stdin" "grep -f - input ; echo \$?" \ + "two\nthree\n0\n" "tw\ntwo\nthree\n" "tw.\nthr\n" + optional FEATURE_GREP_EGREP_ALIAS testing "grep -E supports extended regexps" "grep -E fo+" "foo\n" "" \ "b\ar\nfoo\nbaz" -- cgit v1.2.3