diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rwxr-xr-x | RunGrepTest | 4 | ||||
-rw-r--r-- | pcregrep.c | 2 | ||||
-rw-r--r-- | testdata/grepoutput | 3 |
4 files changed, 11 insertions, 1 deletions
@@ -57,6 +57,9 @@ Version 8.34 xx-xxxx-201x item was recorded. For example, the pattern (?(?=ab)ab) recorded "a" as a first data item, and therefore matched "ca" after "c" instead of at the start. + +11. Change 40 for 8.33 (allowing pcregrep to find empty strings) showed up a + bug that caused the command "echo a | ./pcregrep -M '|a'" to loop. Version 8.33 28-May-2013 diff --git a/RunGrepTest b/RunGrepTest index daaf8af..e192ed7 100755 --- a/RunGrepTest +++ b/RunGrepTest @@ -502,6 +502,10 @@ echo "---------------------------- Test 105 -----------------------------" >>tes (cd $srcdir; $valgrind $pcregrep --colour=always "ipsum|" ./testdata/grepinput3) >>testtry 2>&1 echo "RC=$?" >>testtry +echo "---------------------------- Test 106 -----------------------------" >>testtry +(cd $srcdir; echo "a" | $valgrind $pcregrep -M "|a" ) >>testtry 2>&1 +echo "RC=$?" >>testtry + # Now compare the results. @@ -1835,7 +1835,7 @@ while (ptr < endptr) { char *endmatch = ptr + offsets[1]; t = ptr; - while (t < endmatch) + while (t <= endmatch) { t = end_of_line(t, endptr, &endlinelength); if (t < endmatch) linenumber++; else break; diff --git a/testdata/grepoutput b/testdata/grepoutput index cf04091..9bf9d9d 100644 --- a/testdata/grepoutput +++ b/testdata/grepoutput @@ -740,3 +740,6 @@ RC=0 [1;31m[00m [1;31m[00mtriple: t7_txt s1_tag s_txt p_tag p_txt o_tag o_txt RC=0 +---------------------------- Test 106 ----------------------------- +a +RC=0 |