From 4e1e7205235510b3adeb415b4d8997932276cb81 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Mon, 26 Nov 2007 05:38:20 +0000 Subject: testsuite: add tests for cut and grep; slight improvements to infrastructure --- testsuite/grep.tests | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'testsuite/grep.tests') diff --git a/testsuite/grep.tests b/testsuite/grep.tests index ef0de482b..afbe8e7c9 100755 --- a/testsuite/grep.tests +++ b/testsuite/grep.tests @@ -29,9 +29,10 @@ testing "grep input (specify file)" "grep two input" "two\n" \ testing "grep (no newline at EOL)" "grep bug" "bug" "bug" "" -# Note that this assumes actual is empty. -testing "grep input actual (two files)" "grep two input actual 2> /dev/null" \ +>empty +testing "grep two files" "grep two input empty 2>/dev/null" \ "input:two\n" "one\ntwo\nthree\nthree\nthree\n" "" +rm empty testing "grep - infile (specify stdin and file)" "grep two - input" \ "(standard input):two\ninput:two\n" "one\ntwo\nthree\n" \ @@ -73,6 +74,8 @@ testing "grep matches NUL" "grep . input > /dev/null 2>&1 ; echo \$?" \ # -e regex testing "grep handles multiple regexps" "grep -e one -e two input ; echo \$?" \ "one\ntwo\n0\n" "one\ntwo\n" "" +testing "grep -F handles multiple expessions" "grep -F -e one -e two input ; echo \$?" \ + "one\ntwo\n0\n" "one\ntwo\n" "" optional FEATURE_GREP_EGREP_ALIAS testing "grep -E supports extended regexps" "grep -E fo+" "foo\n" "" \ -- cgit v1.2.3