aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/grep.tests4
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" \
'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