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.
./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.
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 -----------------------------
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
35-fifteen
36-sixteen
37-seventeen
+RC=0
---------------------------- Test 22 -----------------------------
21-one
22-two
32-twelve
33-thirteen
34:fourteen
+RC=0
---------------------------- Test 23 -----------------------------
one
two
fifteen
sixteen
seventeen
+RC=0
---------------------------- Test 24 -----------------------------
four
five
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
32-twelve
33-thirteen
34:fourteen
+RC=0
---------------------------- Test 26 -----------------------------
complete pair
This line contains pattern not on a line by itself.
This is the last line of this file.
+RC=0
---------------------------- Test 27 -----------------------------
four
five
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-
32-twelve
33-thirteen
34:fourteen
+RC=0
---------------------------- Test 29 -----------------------------
of lines all by themselves.
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.
./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.
--
./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
./testdata/grepinputx
RC=0
---------------------------- Test 36 -----------------------------
+./testdata/grepinput3
./testdata/grepinput8
./testdata/grepinputx
RC=0
aaaaa2
RC=0
======== STDERR ========
-pcregrep: pcre_exec() error -8 while matching this text:
+pcregrep: pcre_exec() gave error -8 while matching this text:
+
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
-pcregrep: error -8 means that a resource limit was exceeded
-pcregrep: check your regex for nested unlimited loops
-pcregrep: pcre_exec() error -8 while matching this text:
+
+pcregrep: pcre_exec() gave error -8 while matching this text:
+
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
+
+pcregrep: Error -8 or -21 means that a resource limit was exceeded.
+pcregrep: Check your regex for nested unlimited loops.
---------------------------- Test 38 ------------------------------
This line contains a binary zero here >\0< for testing.
+RC=0
---------------------------- Test 39 ------------------------------
This is a line before the binary zero.
This line contains a binary zero here >\0< for testing.
+RC=0
---------------------------- Test 40 ------------------------------
This line contains a binary zero here >\0< 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 ------------------------------
-pcregrep: Error in 2nd command-line regex at offset 9: missing )
+RC=0
---------------------------- Test 46 ------------------------------
-AB.VE
+pcregrep: Error in 2nd command-line regex at offset 9: missing )
+RC=2
---------------------------- Test 47 ------------------------------
+AB.VE
+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 \e[1;31mjumps\e[00m
This time it \e[1;31mjumps\e[00m and \e[1;31mjumps\e[00m and \e[1;31mjumps\e[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 \e[1;31mpattern\e[00m again.
That time it was on a \e[1;31mline by itself\e[00m.
This line contains \e[1;31mpattern\e[00m not on a \e[1;31mline by itself\e[00m.
----------------------------- Test 55 -----------------------------
+RC=0
+---------------------------- Test 56 -----------------------------
./testdata/grepinput:456
+./testdata/grepinput3:0
./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
+that the pcregrep command is working correctly. The file must be more than 24K
+long so that it needs more than a single read
+
+pcregrep: Error -8 or -21 means that a resource limit was exceeded.
+pcregrep: Check your regex for nested unlimited loops.
+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
+that the pcregrep command is working correctly. The file must be more than 24K
+long so that it needs more than a single read
+
+pcregrep: Error -8 or -21 means that a resource limit was exceeded.
+pcregrep: Check your regex for nested unlimited loops.
+RC=1
+---------------------------- Test 64 ------------------------------
+appears
+RC=0
+---------------------------- Test 65 ------------------------------
+pear
+RC=0
+---------------------------- Test 66 ------------------------------
+RC=0
+---------------------------- Test 67 ------------------------------
+RC=0
+---------------------------- Test 68 ------------------------------
+pear
+RC=0
+---------------------------- Test 69 -----------------------------
+1:This is a second file of input for the pcregrep tests.
+2:
+4:
+5:Pattern
+6:That time it was on a line by itself.
+7:
+8:To pat or not to pat, that is the question.
+9:
+10:complete pair
+11:of lines
+12:
+13:That was a complete pair
+14:of lines all by themselves.
+15:
+16:complete pair
+17:of lines
+18:
+19:And there they were again, to check line numbers.
+20:
+21:one
+22:two
+23:three
+24:four
+25:five
+26:six
+27:seven
+28:eight
+29:nine
+30:ten
+31:eleven
+32:twelve
+33:thirteen
+34:fourteen
+35:fifteen
+36:sixteen
+37:seventeen
+38:eighteen
+39:nineteen
+40:twenty
+41:
+43:This is the last line of this file.
+RC=0
+---------------------------- Test 70 -----------------------------
+\e[1;31mtriple: t1_txt s1_tag s_txt p_tag p_txt o_tag o_txt
+
+\e[00m\e[1;31mtriple: t3_txt s2_tag s_txt p_tag p_txt o_tag o_txt
+
+\e[00m\e[1;31mtriple: t4_txt s1_tag s_txt p_tag p_txt o_tag o_txt
+
+\e[00m\e[1;31mtriple: t6_txt s2_tag s_txt p_tag p_txt o_tag o_txt
+
+\e[00mRC=0
either because PCRE can't be compatible, or there is a possible Perl
bug. --/
-/-- Originally, the Perl 5.10 and 5.11 things were in here too, but now I have
+/-- Originally, the Perl >= 5.10 things were in here too, but now I have
separated many (most?) of them out into test 11. However, there may still
be some that were overlooked. --/
No match
a\x85b
No match
+
+/(*ANY).*/g
+ abc\r\ndef
+ 0: abc
+ 0:
+ 0: def
+ 0:
+
+/(*ANYCRLF).*/g
+ abc\r\ndef
+ 0: abc
+ 0:
+ 0: def
+ 0:
+
+/(*CRLF).*/g
+ abc\r\ndef
+ 0: abc
+ 0:
+ 0: def
+ 0:
/a\Rb/I<bsr_anycrlf>
Capturing subpattern count = 0
+0 ^ x
+0 ^ x
No match
+
+/(*NO_START_OPT)xyz/C
+ abcxyz
+--->abcxyz
++15 ^ x
++15 ^ x
++15 ^ x
++15 ^ x
++16 ^^ y
++17 ^ ^ z
++18 ^ ^
+ 0: xyz
+
+/xyz/CY
+ abcxyz
+--->abcxyz
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +0 ^ x
+ +1 ^^ y
+ +2 ^ ^ z
+ +3 ^ ^
+ 0: xyz
/^"((?(?=[a])[^"])|b)*"$/C
"ab"
xxxxabcde\P\P
Partial match: abcde
-/-- This is not in the Perl 5.10 test because Perl seems currently to be broken
- and not behaving as specified in that it *does* bumpalong after hitting
- (*COMMIT). --/
+/-- This is not in the Perl >= 5.10 test because Perl seems currently to be
+ broken and not behaving as specified in that it *does* bumpalong after
+ hitting (*COMMIT). --/
/(?1)(A(*COMMIT)|B)D/
ABD
End
------------------------------------------------------------------
-/ -- The first four of these are not in the Perl 5.10 test because Perl
+/ -- The first four of these are not in the Perl >= 5.10 test because Perl
documents that the use of \K in assertions is "not well defined". The
last is here because Perl gives the match as "b" rather than "ab". I
believe this to be a Perl bug. --/
Ket
End
------------------------------------------------------------------
- ACBD
+ ACBD
0: ACBD
- ** Failers
+ *** Failers
No match
- A\nB
+ A\nB
No match
- ACB\n
+ ACB\n
No match
/A\NB./sBZ
Ket
End
------------------------------------------------------------------
- ACBD
+ ACBD
0: ACBD
- ACB\n
+ ACB\n
0: ACB\x0a
- ** Failers
+ *** Failers
No match
- A\nB
+ A\nB
No match
/A\NB/<crlf>
- A\nB
+ A\nB
0: A\x0aB
- A\rB
+ A\rB
0: A\x0dB
- ** Failers
+ ** Failers
No match
- A\r\nB
+ A\r\nB
No match
/\R+b/BZ
End
------------------------------------------------------------------
+/-- Perl treats this one differently, not failing the second string. I believe
+ that is a bug in Perl. --/
+
+/^((abc|abcx)(*THEN)y|abcd)/
+ abcd
+ 0: abcd
+ 1: abcd
+ *** Failers
+No match
+ abcxy
+No match
+
+/(?<=abc)def/
+ abc\P\P
+Partial match: abc
+
+/abc$/
+ abc
+ 0: abc
+ abc\P
+ 0: abc
+ abc\P\P
+Partial match: abc
+
+/abc$/m
+ abc
+ 0: abc
+ abc\n
+ 0: abc
+ abc\P\P
+Partial match: abc
+ abc\n\P\P
+ 0: abc
+ abc\P
+ 0: abc
+ abc\n\P
+ 0: abc
+
+/abc\z/
+ abc
+ 0: abc
+ abc\P
+ 0: abc
+ abc\P\P
+Partial match: abc
+
+/abc\Z/
+ abc
+ 0: abc
+ abc\P
+ 0: abc
+ abc\P\P
+Partial match: abc
+
+/abc\b/
+ abc
+ 0: abc
+ abc\P
+ 0: abc
+ abc\P\P
+Partial match: abc
+
+/abc\B/
+ abc
+No match
+ abc\P
+Partial match: abc
+ abc\P\P
+Partial match: abc
+
+/.+/
+ abc\>0
+ 0: abc
+ abc\>1
+ 0: bc
+ abc\>2
+ 0: c
+ abc\>3
+No match
+ abc\>4
+Error -24
+ abc\>-4
+Error -24
+
+/^\cģ/
+Failed: \c must be followed by an ASCII character at offset 3
+
+/(?P<abn>(?P=abn)xxx)/BZ
+------------------------------------------------------------------
+ Bra
+ Once
+ CBra 1
+ \1
+ xxx
+ Ket
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
+/(a\1z)/BZ
+------------------------------------------------------------------
+ Bra
+ Once
+ CBra 1
+ a
+ \1
+ z
+ Ket
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
+/(?P<abn>(?P=abn)(?<badstufxxx)/BZ
+Failed: syntax error in subpattern name (missing terminator) at offset 29
+
+/(?P<abn>(?P=axn)xxx)/BZ
+Failed: reference to non-existent subpattern at offset 15
+
+/(?P<abn>(?P=axn)xxx)(?<axn>yy)/BZ
+------------------------------------------------------------------
+ Bra
+ CBra 1
+ \2
+ xxx
+ Ket
+ CBra 2
+ yy
+ Ket
+ Ket
+ End
+------------------------------------------------------------------
+
/-- End of testinput2 --/