grep: fix -o match with empty string (suggested by Colin Watson <cjwatson@ubuntu.com>)
function old new delta grep_file 1216 1251 +35 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@ -98,5 +98,9 @@ testing "grep -o does not loop forever" \
|
||||
'grep -o "[^/]*$"' \
|
||||
"test\n" \
|
||||
"" "/var/test\n"
|
||||
testing "grep -o does not loop forever on zero-length match" \
|
||||
'grep -o "" | head -n1' \
|
||||
"" \
|
||||
"" "test\n"
|
||||
|
||||
exit $FAILCOUNT
|
||||
|
Reference in New Issue
Block a user