From 6dc0ace10943b9f8e004b63277dc1186594f0450 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 4 Dec 2009 02:48:14 +0100 Subject: grep: fix a case when -o loops forever Signed-off-by: Denys Vlasenko --- testsuite/grep.tests | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'testsuite/grep.tests') diff --git a/testsuite/grep.tests b/testsuite/grep.tests index 6e14f91ce..64df19ced 100755 --- a/testsuite/grep.tests +++ b/testsuite/grep.tests @@ -90,4 +90,9 @@ testing "grep -E -o prints all matches" \ "00:19:3E:00:AA:5E\n00:1D:60:3D:3A:FB\n00:22:43:49:FB:AA\n" \ "" "00:19:3E:00:AA:5E 00:1D:60:3D:3A:FB 00:22:43:49:FB:AA\n" +testing "grep -o does not loop forever" \ + 'grep -o "[^/]*$"' \ + "test\n" \ + "" "/var/test\n" + exit $FAILCOUNT -- cgit v1.2.3