diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2014-02-27 14:56:12 +0100 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2014-02-27 14:56:12 +0100 |
commit | 83e49ade5724f5b3744660e45179461fe2a1b0f8 (patch) | |
tree | 1f819a54cf2eb2955bea016c4906f70b99c1c20a /testsuite/grep.tests | |
parent | 6f068904dc142657bb596f91196f9113f1838cbe (diff) | |
download | busybox-w32-83e49ade5724f5b3744660e45179461fe2a1b0f8.tar.gz busybox-w32-83e49ade5724f5b3744660e45179461fe2a1b0f8.tar.bz2 busybox-w32-83e49ade5724f5b3744660e45179461fe2a1b0f8.zip |
grep: fix -w match if first match isn't a word, but second is. Closes 4520
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite/grep.tests')
-rwxr-xr-x | testsuite/grep.tests | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/testsuite/grep.tests b/testsuite/grep.tests index 74b0eb63f..323b3849d 100755 --- a/testsuite/grep.tests +++ b/testsuite/grep.tests | |||
@@ -165,6 +165,12 @@ testing "grep -w word doesn't match wordword" \ | |||
165 | "wordword\n" \ | 165 | "wordword\n" \ |
166 | "" | 166 | "" |
167 | 167 | ||
168 | testing "grep -w word match second word" \ | ||
169 | "grep -w word input" \ | ||
170 | "bword,word\n""wordb,word\n""bwordb,word\n" \ | ||
171 | "bword,word\n""wordb,word\n""bwordb,word\n" \ | ||
172 | "" | ||
173 | |||
168 | # testing "test name" "commands" "expected result" "file input" "stdin" | 174 | # testing "test name" "commands" "expected result" "file input" "stdin" |
169 | # file input will be file called "input" | 175 | # file input will be file called "input" |
170 | # test can create a file "actual" instead of writing to stdout | 176 | # test can create a file "actual" instead of writing to stdout |