aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorLauri Kasanen <curaga@operamail.com>2011-08-28 12:39:04 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2011-08-28 12:39:04 +0200
commit7b46220d922d7c6267a8442ff8c3a6d1ab106727 (patch)
tree599a640d94d61d38350d127c36cb234871e213ba /testsuite
parent2390109dcbc7769c8cc373db32805206522ca9a6 (diff)
downloadbusybox-7b46220d922d7c6267a8442ff8c3a6d1ab106727.tar.gz
grep: be GNU compatible with -f EMPTY_FILE
Signed-off-by: Lauri Kasanen <curaga@operamail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/grep.tests18
1 files changed, 17 insertions, 1 deletions
diff --git a/testsuite/grep.tests b/testsuite/grep.tests
index ffce033e6..006a215e1 100755
--- a/testsuite/grep.tests
+++ b/testsuite/grep.tests
@@ -7,7 +7,7 @@
. ./testing.sh
-# testing "test name" "options" "expected result" "file input" "stdin"
+# testing "test name" "commands" "expected result" "file input" "stdin"
# file input will be file called "input"
# test can create a file "actual" instead of writing to stdout
@@ -103,4 +103,20 @@ testing "grep -o does not loop forever on zero-length match" \
"" \
"" "test\n"
+testing "grep -f EMPTY_FILE" \
+ "grep -f input" \
+ "" \
+ "" \
+ "test\n"
+
+testing "grep -v -f EMPTY_FILE" \
+ "grep -v -f input" \
+ "test\n" \
+ "" \
+ "test\n"
+
+# testing "test name" "commands" "expected result" "file input" "stdin"
+# file input will be file called "input"
+# test can create a file "actual" instead of writing to stdout
+
exit $FAILCOUNT