[Pcre-svn] [564] code/trunk: Fix bad return code from pcregr…

トップ ページ
このメッセージを削除
著者: Subversion repository
日付:  
To: pcre-svn
題目: [Pcre-svn] [564] code/trunk: Fix bad return code from pcregrep when -o is used ( yielded 1, not 0, after a
Revision: 564
          http://vcs.pcre.org/viewvc?view=rev&revision=564
Author:   ph10
Date:     2010-10-31 16:07:24 +0000 (Sun, 31 Oct 2010)


Log Message:
-----------
Fix bad return code from pcregrep when -o is used (yielded 1, not 0, after a
match).

Modified Paths:
--------------
    code/trunk/ChangeLog
    code/trunk/RunGrepTest
    code/trunk/pcregrep.c
    code/trunk/testdata/grepoutput
    code/trunk/testdata/grepoutput8


Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog    2010-10-31 14:15:04 UTC (rev 563)
+++ code/trunk/ChangeLog    2010-10-31 16:07:24 UTC (rev 564)
@@ -61,7 +61,10 @@


10. Added two casts needed to build with Visual Studio when NO_RECURSE is set.

+11. When the -o option was used, pcregrep was setting a return code of 1, even
+    when matches were found, and --line-buffered was not being honoured.


+
Version 8.10 25-Jun-2010
------------------------


Modified: code/trunk/RunGrepTest
===================================================================
--- code/trunk/RunGrepTest    2010-10-31 14:15:04 UTC (rev 563)
+++ code/trunk/RunGrepTest    2010-10-31 16:07:24 UTC (rev 564)
@@ -52,27 +52,35 @@


echo "---------------------------- Test 1 ------------------------------" >testtry
(cd $srcdir; $valgrind $pcregrep PATTERN ./testdata/grepinput) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 2 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep '^PATTERN' ./testdata/grepinput) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 3 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -in PATTERN ./testdata/grepinput) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 4 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -ic PATTERN ./testdata/grepinput) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 5 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -in PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 6 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -inh PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 7 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -il PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 8 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -l PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 9 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -q PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
@@ -84,69 +92,91 @@

echo "---------------------------- Test 11 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -vn pattern ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 12 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -ix pattern ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 13 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -f./testdata/greplist ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 14 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -w pat ./testdata/grepinput ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 15 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep 'abc^*' ./testdata/grepinput) 2>>testtry >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 16 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep abc ./testdata/grepinput ./testdata/nonexistfile) 2>>testtry >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 17 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -M 'the\noutput' ./testdata/grepinput) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 18 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -Mn '(the\noutput|dog\.\n--)' ./testdata/grepinput) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 19 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -Mix 'Pattern' ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 20 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -Mixn 'complete pair\nof lines' ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 21 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -nA3 'four' ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 22 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -nB3 'four' ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 23 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -C3 'four' ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 24 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -A9 'four' ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 25 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -nB9 'four' ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 26 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -A9 -B9 'four' ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 27 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -A10 'four' ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 28 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -nB10 'four' ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 29 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -C12 -B10 'four' ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 30 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -inB3 'pattern' ./testdata/grepinput ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 31 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -inA3 'pattern' ./testdata/grepinput ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 32 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -L 'fox' ./testdata/grepinput ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 33 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep 'fox' ./testdata/grepnonexist) >>testtry 2>&1
@@ -172,84 +202,110 @@

echo "---------------------------- Test 38 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep '>\x00<' ./testdata/grepinput) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 39 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -A1 'before the binary zero' ./testdata/grepinput) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 40 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -B1 'after the binary zero' ./testdata/grepinput) >>testtry
+echo "RC=$?" >>testtry

echo "---------------------------- Test 41 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -B1 -o '\w+ the binary zero' ./testdata/grepinput) >>testtry
+echo "RC=$?" >>testtry

-echo "---------------------------- Test 41 ------------------------------" >>testtry
+echo "---------------------------- Test 42 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -B1 -onH '\w+ the binary zero' ./testdata/grepinput) >>testtry
+echo "RC=$?" >>testtry

-echo "---------------------------- Test 42 ------------------------------" >>testtry
+echo "---------------------------- Test 43 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -on 'before|zero|after' ./testdata/grepinput) >>testtry
+echo "RC=$?" >>testtry

-echo "---------------------------- Test 43 ------------------------------" >>testtry
+echo "---------------------------- Test 44 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -on -e before -ezero -e after ./testdata/grepinput) >>testtry
+echo "RC=$?" >>testtry

-echo "---------------------------- Test 44 ------------------------------" >>testtry
+echo "---------------------------- Test 45 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -on -f ./testdata/greplist -e binary ./testdata/grepinput) >>testtry
+echo "RC=$?" >>testtry

-echo "---------------------------- Test 45 ------------------------------" >>testtry
+echo "---------------------------- Test 46 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -eabc -e '(unclosed' ./testdata/grepinput) 2>>testtry >>testtry
+echo "RC=$?" >>testtry

-echo "---------------------------- Test 46 ------------------------------" >>testtry
+echo "---------------------------- Test 47 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -Fx "AB.VE
elephant" ./testdata/grepinput) >>testtry
+echo "RC=$?" >>testtry

-echo "---------------------------- Test 47 ------------------------------" >>testtry
+echo "---------------------------- Test 48 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -F "AB.VE
elephant" ./testdata/grepinput) >>testtry
+echo "RC=$?" >>testtry

-echo "---------------------------- Test 48 ------------------------------" >>testtry
+echo "---------------------------- Test 49 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -F -e DATA -e "AB.VE
elephant" ./testdata/grepinput) >>testtry
+echo "RC=$?" >>testtry

-echo "---------------------------- Test 49 ------------------------------" >>testtry
+echo "---------------------------- Test 50 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep "^(abc|def|ghi|jkl)" ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry

-echo "---------------------------- Test 50 ------------------------------" >>testtry
+echo "---------------------------- Test 51 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -Mv "brown\sfox" ./testdata/grepinputv) >>testtry
+echo "RC=$?" >>testtry

-echo "---------------------------- Test 51 ------------------------------" >>testtry
+echo "---------------------------- Test 52 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep --colour=always jumps ./testdata/grepinputv) >>testtry
+echo "RC=$?" >>testtry

-echo "---------------------------- Test 52 ------------------------------" >>testtry
+echo "---------------------------- Test 53 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep --file-offsets 'before|zero|after' ./testdata/grepinput) >>testtry
+echo "RC=$?" >>testtry

-echo "---------------------------- Test 53 ------------------------------" >>testtry
+echo "---------------------------- Test 54 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep --line-offsets 'before|zero|after' ./testdata/grepinput) >>testtry
+echo "RC=$?" >>testtry

-echo "---------------------------- Test 54 -----------------------------" >>testtry
+echo "---------------------------- Test 55 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -f./testdata/greplist --color=always ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry

-echo "---------------------------- Test 55 -----------------------------" >>testtry
+echo "---------------------------- Test 56 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -c lazy ./testdata/grepinput*) >>testtry
+echo "RC=$?" >>testtry

-echo "---------------------------- Test 56 -----------------------------" >>testtry
+echo "---------------------------- Test 57 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -c -l lazy ./testdata/grepinput*) >>testtry
+echo "RC=$?" >>testtry

-echo "---------------------------- Test 57 -----------------------------" >>testtry
+echo "---------------------------- Test 58 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep --regex=PATTERN ./testdata/grepinput) >>testtry
+echo "RC=$?" >>testtry

-echo "---------------------------- Test 58 -----------------------------" >>testtry
+echo "---------------------------- Test 59 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep --regexp=PATTERN ./testdata/grepinput) >>testtry
+echo "RC=$?" >>testtry

-echo "---------------------------- Test 59 -----------------------------" >>testtry
+echo "---------------------------- Test 60 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep --regex PATTERN ./testdata/grepinput) >>testtry
+echo "RC=$?" >>testtry

-echo "---------------------------- Test 60 -----------------------------" >>testtry
+echo "---------------------------- Test 61 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep --regexp PATTERN ./testdata/grepinput) >>testtry
+echo "RC=$?" >>testtry

-echo "---------------------------- Test 61 -----------------------------" >>testtry
+echo "---------------------------- Test 62 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep --match-limit=1000 -M 'This is a file(.|\R)*file.' ./testdata/grepinput) >>testtry 2>&1
+echo "RC=$?" >>testtry

-echo "---------------------------- Test 62 -----------------------------" >>testtry
+echo "---------------------------- Test 63 -----------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep --recursion-limit=1000 -M 'This is a file(.|\R)*file.' ./testdata/grepinput) >>testtry 2>&1
+echo "RC=$?" >>testtry

# Now compare the results.

@@ -264,9 +320,11 @@

echo "---------------------------- Test U1 ------------------------------" >testtry
(cd $srcdir; $valgrind $pcregrep -n -u --newline=any "^X" ./testdata/grepinput8) >>testtry
+ echo "RC=$?" >>testtry

echo "---------------------------- Test U2 ------------------------------" >>testtry
(cd $srcdir; $valgrind $pcregrep -n -u -C 3 --newline=any "Match" ./testdata/grepinput8) >>testtry
+ echo "RC=$?" >>testtry

$cf $srcdir/testdata/grepoutput8 testtry
if [ $? != 0 ] ; then exit 1; fi

Modified: code/trunk/pcregrep.c
===================================================================
--- code/trunk/pcregrep.c    2010-10-31 14:15:04 UTC (rev 563)
+++ code/trunk/pcregrep.c    2010-10-31 16:07:24 UTC (rev 564)
@@ -1204,6 +1204,8 @@
         matchptr += offsets[1];
         length -= offsets[1];
         match = FALSE;
+        if (line_buffered) fflush(stdout);
+        rc = 0;    /* Had some success */
         goto ONLY_MATCHING_RESTART;
         }
       }


Modified: code/trunk/testdata/grepoutput
===================================================================
--- code/trunk/testdata/grepoutput    2010-10-31 14:15:04 UTC (rev 563)
+++ code/trunk/testdata/grepoutput    2010-10-31 16:07:24 UTC (rev 564)
@@ -2,15 +2,19 @@
 PATTERN at the start of a line.
 In the middle of a line, PATTERN appears.
 Check up on PATTERN near the end.
+RC=0
 ---------------------------- Test 2 ------------------------------
 PATTERN at the start of a line.
+RC=0
 ---------------------------- Test 3 ------------------------------
 7:PATTERN at the start of a line.
 8:In the middle of a line, PATTERN appears.
 10:This pattern is in lower case.
 608:Check up on PATTERN near the end.
+RC=0
 ---------------------------- Test 4 ------------------------------
 4
+RC=0
 ---------------------------- Test 5 ------------------------------
 ./testdata/grepinput:7:PATTERN at the start of a line.
 ./testdata/grepinput:8:In the middle of a line, PATTERN appears.
@@ -19,6 +23,7 @@
 ./testdata/grepinputx:3:Here is the pattern again.
 ./testdata/grepinputx:5:Pattern
 ./testdata/grepinputx:42:This line contains pattern not on a line by itself.
+RC=0
 ---------------------------- Test 6 ------------------------------
 7:PATTERN at the start of a line.
 8:In the middle of a line, PATTERN appears.
@@ -27,11 +32,14 @@
 3:Here is the pattern again.
 5:Pattern
 42:This line contains pattern not on a line by itself.
+RC=0
 ---------------------------- Test 7 ------------------------------
 ./testdata/grepinput
 ./testdata/grepinputx
+RC=0
 ---------------------------- Test 8 ------------------------------
 ./testdata/grepinput
+RC=0
 ---------------------------- Test 9 ------------------------------
 RC=0
 ---------------------------- Test 10 -----------------------------
@@ -78,33 +86,43 @@
 40:twenty
 41:
 43:This is the last line of this file.
+RC=0
 ---------------------------- Test 12 -----------------------------
 Pattern
+RC=0
 ---------------------------- Test 13 -----------------------------
 Here is the pattern again.
 That time it was on a line by itself.
 This line contains pattern not on a line by itself.
+RC=0
 ---------------------------- Test 14 -----------------------------
 ./testdata/grepinputx:To pat or not to pat, that is the question.
+RC=0
 ---------------------------- Test 15 -----------------------------
 pcregrep: Error in command-line regex at offset 4: nothing to repeat
+RC=2
 ---------------------------- Test 16 -----------------------------
 pcregrep: Failed to open ./testdata/nonexistfile: No such file or directory
+RC=2
 ---------------------------- Test 17 -----------------------------
 features should be added at the end, because some of the tests involve the
 output of line numbers, and we don't want these to change.
+RC=0
 ---------------------------- Test 18 -----------------------------
 4:features should be added at the end, because some of the tests involve the
 output of line numbers, and we don't want these to change.
 583:brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
 -------------------------------------------------------------------------------
+RC=0
 ---------------------------- Test 19 -----------------------------
 Pattern
+RC=0
 ---------------------------- Test 20 -----------------------------
 10:complete pair
 of lines
 16:complete pair
 of lines
+RC=0
 ---------------------------- Test 21 -----------------------------
 24:four
 25-five
@@ -115,6 +133,7 @@
 35-fifteen
 36-sixteen
 37-seventeen
+RC=0
 ---------------------------- Test 22 -----------------------------
 21-one
 22-two
@@ -125,6 +144,7 @@
 32-twelve
 33-thirteen
 34:fourteen
+RC=0
 ---------------------------- Test 23 -----------------------------
 one
 two
@@ -141,6 +161,7 @@
 fifteen
 sixteen
 seventeen
+RC=0
 ---------------------------- Test 24 -----------------------------
 four
 five
@@ -162,6 +183,7 @@


This line contains pattern not on a line by itself.
This is the last line of this file.
+RC=0
---------------------------- Test 25 -----------------------------
15-
16-complete pair
@@ -183,6 +205,7 @@
32-twelve
33-thirteen
34:fourteen
+RC=0
---------------------------- Test 26 -----------------------------

complete pair
@@ -213,6 +236,7 @@

This line contains pattern not on a line by itself.
This is the last line of this file.
+RC=0
---------------------------- Test 27 -----------------------------
four
five
@@ -234,6 +258,7 @@

This line contains pattern not on a line by itself.
This is the last line of this file.
+RC=0
---------------------------- Test 28 -----------------------------
14-of lines all by themselves.
15-
@@ -256,6 +281,7 @@
32-twelve
33-thirteen
34:fourteen
+RC=0
---------------------------- Test 29 -----------------------------
of lines all by themselves.

@@ -287,6 +313,7 @@

This line contains pattern not on a line by itself.
This is the last line of this file.
+RC=0
---------------------------- Test 30 -----------------------------
./testdata/grepinput-4-features should be added at the end, because some of the tests involve the
./testdata/grepinput-5-output of line numbers, and we don't want these to change.
@@ -311,6 +338,7 @@
./testdata/grepinputx-40-twenty
./testdata/grepinputx-41-
./testdata/grepinputx:42:This line contains pattern not on a line by itself.
+RC=0
---------------------------- Test 31 -----------------------------
./testdata/grepinput:7:PATTERN at the start of a line.
./testdata/grepinput:8:In the middle of a line, PATTERN appears.
@@ -332,8 +360,10 @@
--
./testdata/grepinputx:42:This line contains pattern not on a line by itself.
./testdata/grepinputx-43-This is the last line of this file.
+RC=0
---------------------------- Test 32 -----------------------------
./testdata/grepinputx
+RC=0
---------------------------- Test 33 -----------------------------
pcregrep: Failed to open ./testdata/grepnonexist: No such file or directory
RC=2
@@ -363,95 +393,119 @@
pcregrep: Check your regex for nested unlimited loops.
---------------------------- Test 38 ------------------------------
This line contains a binary zero here >?< for testing.
+RC=0
---------------------------- Test 39 ------------------------------
This is a line before the binary zero.
This line contains a binary zero here >?< for testing.
+RC=0
---------------------------- Test 40 ------------------------------
This line contains a binary zero here >?< for testing.
This is a line after the binary zero.
+RC=0
---------------------------- Test 41 ------------------------------
before the binary zero
after the binary zero
----------------------------- Test 41 ------------------------------
+RC=0
+---------------------------- Test 42 ------------------------------
./testdata/grepinput:595:before the binary zero
./testdata/grepinput:597:after the binary zero
----------------------------- Test 42 ------------------------------
+RC=0
+---------------------------- Test 43 ------------------------------
595:before
595:zero
596:zero
597:after
597:zero
----------------------------- Test 43 ------------------------------
+RC=0
+---------------------------- Test 44 ------------------------------
595:before
595:zero
596:zero
597:zero
----------------------------- Test 44 ------------------------------
+RC=0
+---------------------------- Test 45 ------------------------------
10:pattern
595:binary
596:binary
597:binary
----------------------------- Test 45 ------------------------------
+RC=0
+---------------------------- Test 46 ------------------------------
pcregrep: Error in 2nd command-line regex at offset 9: missing )
----------------------------- Test 46 ------------------------------
+RC=2
+---------------------------- Test 47 ------------------------------
AB.VE
----------------------------- Test 47 ------------------------------
+RC=0
+---------------------------- Test 48 ------------------------------
ABOVE the elephant
AB.VE
AB.VE the turtle
----------------------------- Test 48 ------------------------------
+RC=0
+---------------------------- Test 49 ------------------------------
ABOVE the elephant
AB.VE
AB.VE the turtle
PUT NEW DATA ABOVE THIS LINE.
----------------------------- Test 49 ------------------------------
+RC=0
---------------------------- Test 50 ------------------------------
+RC=1
+---------------------------- Test 51 ------------------------------
over the lazy dog.
This time it jumps and jumps and jumps.
----------------------------- Test 51 ------------------------------
+RC=0
+---------------------------- Test 52 ------------------------------
fox ?[1;31mjumps?[00m
This time it ?[1;31mjumps?[00m and ?[1;31mjumps?[00m and ?[1;31mjumps?[00m.
----------------------------- Test 52 ------------------------------
+RC=0
+---------------------------- Test 53 ------------------------------
36972,6
36990,4
37024,4
37066,5
37083,4
----------------------------- Test 53 ------------------------------
+RC=0
+---------------------------- Test 54 ------------------------------
595:15,6
595:33,4
596:28,4
597:15,5
597:32,4
----------------------------- Test 54 -----------------------------
+RC=0
+---------------------------- Test 55 -----------------------------
Here is the ?[1;31mpattern?[00m again.
That time it was on a ?[1;31mline by itself?[00m.
This line contains ?[1;31mpattern?[00m not on a ?[1;31mline by itself?[00m.
----------------------------- Test 55 -----------------------------
+RC=0
+---------------------------- Test 56 -----------------------------
./testdata/grepinput:456
./testdata/grepinput8:0
./testdata/grepinputv:1
./testdata/grepinputx:0
----------------------------- Test 56 -----------------------------
+RC=0
+---------------------------- Test 57 -----------------------------
./testdata/grepinput:456
./testdata/grepinputv:1
----------------------------- Test 57 -----------------------------
-PATTERN at the start of a line.
-In the middle of a line, PATTERN appears.
-Check up on PATTERN near the end.
+RC=0
---------------------------- Test 58 -----------------------------
PATTERN at the start of a line.
In the middle of a line, PATTERN appears.
Check up on PATTERN near the end.
+RC=0
---------------------------- Test 59 -----------------------------
PATTERN at the start of a line.
In the middle of a line, PATTERN appears.
Check up on PATTERN near the end.
+RC=0
---------------------------- Test 60 -----------------------------
PATTERN at the start of a line.
In the middle of a line, PATTERN appears.
Check up on PATTERN near the end.
+RC=0
---------------------------- Test 61 -----------------------------
+PATTERN at the start of a line.
+In the middle of a line, PATTERN appears.
+Check up on PATTERN near the end.
+RC=0
+---------------------------- Test 62 -----------------------------
pcregrep: pcre_exec() gave error -8 while matching text that starts:

This is a file of miscellaneous text that is used as test data for checking
@@ -460,7 +514,8 @@

pcregrep: Error -8 or -21 means that a resource limit was exceeded.
pcregrep: Check your regex for nested unlimited loops.
----------------------------- Test 62 -----------------------------
+RC=1
+---------------------------- Test 63 -----------------------------
pcregrep: pcre_exec() gave error -21 while matching text that starts:

This is a file of miscellaneous text that is used as test data for checking
@@ -469,3 +524,4 @@

pcregrep: Error -8 or -21 means that a resource limit was exceeded.
pcregrep: Check your regex for nested unlimited loops.
+RC=1

Modified: code/trunk/testdata/grepoutput8
===================================================================
--- code/trunk/testdata/grepoutput8    2010-10-31 14:15:04 UTC (rev 563)
+++ code/trunk/testdata/grepoutput8    2010-10-31 16:07:24 UTC (rev 564)
@@ -4,8 +4,10 @@
 5:X five
 6:X six
 7:X seven…8:X eight
9:X nine
10:X ten
+RC=0
 ---------------------------- Test U2 ------------------------------
 12-Before 111
 13-Before 222
14-Before 333…15:Match
 16-After 111
 17-After 222
18-After 333
+RC=0