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>
This commit is contained in:
@@ -165,6 +165,12 @@ testing "grep -w word doesn't match wordword" \
|
||||
"wordword\n" \
|
||||
""
|
||||
|
||||
testing "grep -w word match second word" \
|
||||
"grep -w word input" \
|
||||
"bword,word\n""wordb,word\n""bwordb,word\n" \
|
||||
"bword,word\n""wordb,word\n""bwordb,word\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
|
||||
|
Reference in New Issue
Block a user