diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-08-23 02:39:47 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-08-23 02:39:47 +0200 |
commit | 3d8b96d58d74d775e34de8d19a03db5380eb8f2c (patch) | |
tree | c836d8788edcc5af94d8782857f70d9aca5b18a1 /testsuite/grep.tests | |
parent | b276e418351612341e31da6385edbc3c91d2f6e8 (diff) | |
download | busybox-w32-3d8b96d58d74d775e34de8d19a03db5380eb8f2c.tar.gz busybox-w32-3d8b96d58d74d775e34de8d19a03db5380eb8f2c.tar.bz2 busybox-w32-3d8b96d58d74d775e34de8d19a03db5380eb8f2c.zip |
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>
Diffstat (limited to 'testsuite/grep.tests')
-rwxr-xr-x | testsuite/grep.tests | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/testsuite/grep.tests b/testsuite/grep.tests index 520a1840f..ffce033e6 100755 --- a/testsuite/grep.tests +++ b/testsuite/grep.tests | |||
@@ -98,5 +98,9 @@ testing "grep -o does not loop forever" \ | |||
98 | 'grep -o "[^/]*$"' \ | 98 | 'grep -o "[^/]*$"' \ |
99 | "test\n" \ | 99 | "test\n" \ |
100 | "" "/var/test\n" | 100 | "" "/var/test\n" |
101 | testing "grep -o does not loop forever on zero-length match" \ | ||
102 | 'grep -o "" | head -n1' \ | ||
103 | "" \ | ||
104 | "" "test\n" | ||
101 | 105 | ||
102 | exit $FAILCOUNT | 106 | exit $FAILCOUNT |