summaryrefslogtreecommitdiff
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 520a184..ffce033 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