grep: fix grep -Fw not respecting the -w option. Closes 5792

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2013-01-20 16:57:19 +01:00
parent 81fa999540
commit 2f5b5beb28
2 changed files with 44 additions and 5 deletions

View File

@ -115,6 +115,18 @@ testing "grep -v -f EMPTY_FILE" \
"" \
"test\n"
testing "grep -Fw matches only words" \
"grep -Fw foo input" \
"" \
"foop\n" \
""
testing "grep -Fw doesn't stop on 1st mismatch" \
"grep -Fw foo input" \
"foop foo\n" \
"foop foo\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