1 ---------------------------- Test 1 ------------------------------
2 PATTERN at the start of a line.
3 In the middle of a line, PATTERN appears.
4 Check up on PATTERN near the end.
6 ---------------------------- Test 2 ------------------------------
7 PATTERN at the start of a line.
9 ---------------------------- Test 3 ------------------------------
10 7:PATTERN at the start of a line.
11 8:In the middle of a line, PATTERN appears.
12 10:This pattern is in lower case.
13 623:Check up on PATTERN near the end.
15 ---------------------------- Test 4 ------------------------------
18 ---------------------------- Test 5 ------------------------------
19 ./testdata/grepinput:7:PATTERN at the start of a line.
20 ./testdata/grepinput:8:In the middle of a line, PATTERN appears.
21 ./testdata/grepinput:10:This pattern is in lower case.
22 ./testdata/grepinput:623:Check up on PATTERN near the end.
23 ./testdata/grepinputx:3:Here is the pattern again.
24 ./testdata/grepinputx:5:Pattern
25 ./testdata/grepinputx:42:This line contains pattern not on a line by itself.
27 ---------------------------- Test 6 ------------------------------
28 7:PATTERN at the start of a line.
29 8:In the middle of a line, PATTERN appears.
30 10:This pattern is in lower case.
31 623:Check up on PATTERN near the end.
32 3:Here is the pattern again.
34 42:This line contains pattern not on a line by itself.
36 ---------------------------- Test 7 ------------------------------
40 ---------------------------- Test 8 ------------------------------
43 ---------------------------- Test 9 ------------------------------
45 ---------------------------- Test 10 -----------------------------
47 ---------------------------- Test 11 -----------------------------
48 1:This is a second file of input for the pcregrep tests.
52 6:That time it was on a line by itself.
54 8:To pat or not to pat, that is the question.
59 13:That was a complete pair
60 14:of lines all by themselves.
65 19:And there they were again, to check line numbers.
88 43:This is the last line of this file.
90 ---------------------------- Test 12 -----------------------------
93 ---------------------------- Test 13 -----------------------------
94 Here is the pattern again.
95 That time it was on a line by itself.
97 This line contains pattern not on a line by itself.
99 ---------------------------- Test 14 -----------------------------
100 ./testdata/grepinputx:To pat or not to pat, that is the question.
102 ---------------------------- Test 15 -----------------------------
103 pcre2grep: Error in command-line regex at offset 4: quantifier does not follow a repeatable item
105 ---------------------------- Test 16 -----------------------------
106 pcre2grep: Failed to open ./testdata/nonexistfile: No such file or directory
108 ---------------------------- Test 17 -----------------------------
109 features should be added at the end, because some of the tests involve the
110 output of line numbers, and we don't want these to change.
112 ---------------------------- Test 18 -----------------------------
113 4:features should be added at the end, because some of the tests involve the
114 output of line numbers, and we don't want these to change.
115 583:brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
116 -------------------------------------------------------------------------------
118 ---------------------------- Test 19 -----------------------------
121 ---------------------------- Test 20 -----------------------------
127 ---------------------------- Test 21 -----------------------------
138 ---------------------------- Test 22 -----------------------------
149 ---------------------------- Test 23 -----------------------------
166 ---------------------------- Test 24 -----------------------------
185 This line contains pattern not on a line by itself.
186 This is the last line of this file.
188 ---------------------------- Test 25 -----------------------------
193 19-And there they were again, to check line numbers.
210 ---------------------------- Test 26 -----------------------------
215 And there they were again, to check line numbers.
238 This line contains pattern not on a line by itself.
239 This is the last line of this file.
241 ---------------------------- Test 27 -----------------------------
260 This line contains pattern not on a line by itself.
261 This is the last line of this file.
263 ---------------------------- Test 28 -----------------------------
264 14-of lines all by themselves.
269 19-And there they were again, to check line numbers.
286 ---------------------------- Test 29 -----------------------------
287 of lines all by themselves.
292 And there they were again, to check line numbers.
315 This line contains pattern not on a line by itself.
316 This is the last line of this file.
318 ---------------------------- Test 30 -----------------------------
319 ./testdata/grepinput-4-features should be added at the end, because some of the tests involve the
320 ./testdata/grepinput-5-output of line numbers, and we don't want these to change.
321 ./testdata/grepinput-6-
322 ./testdata/grepinput:7:PATTERN at the start of a line.
323 ./testdata/grepinput:8:In the middle of a line, PATTERN appears.
324 ./testdata/grepinput-9-
325 ./testdata/grepinput:10:This pattern is in lower case.
327 ./testdata/grepinput-620-PUT NEW DATA ABOVE THIS LINE.
328 ./testdata/grepinput-621-=============================
329 ./testdata/grepinput-622-
330 ./testdata/grepinput:623:Check up on PATTERN near the end.
332 ./testdata/grepinputx-1-This is a second file of input for the pcregrep tests.
333 ./testdata/grepinputx-2-
334 ./testdata/grepinputx:3:Here is the pattern again.
335 ./testdata/grepinputx-4-
336 ./testdata/grepinputx:5:Pattern
338 ./testdata/grepinputx-39-nineteen
339 ./testdata/grepinputx-40-twenty
340 ./testdata/grepinputx-41-
341 ./testdata/grepinputx:42:This line contains pattern not on a line by itself.
343 ---------------------------- Test 31 -----------------------------
344 ./testdata/grepinput:7:PATTERN at the start of a line.
345 ./testdata/grepinput:8:In the middle of a line, PATTERN appears.
346 ./testdata/grepinput-9-
347 ./testdata/grepinput:10:This pattern is in lower case.
348 ./testdata/grepinput-11-
349 ./testdata/grepinput-12-Here follows a whole lot of stuff that makes the file over 24KiB long.
350 ./testdata/grepinput-13-
352 ./testdata/grepinput:623:Check up on PATTERN near the end.
353 ./testdata/grepinput-624-This is the last line of this file.
355 ./testdata/grepinputx:3:Here is the pattern again.
356 ./testdata/grepinputx-4-
357 ./testdata/grepinputx:5:Pattern
358 ./testdata/grepinputx-6-That time it was on a line by itself.
359 ./testdata/grepinputx-7-
360 ./testdata/grepinputx-8-To pat or not to pat, that is the question.
362 ./testdata/grepinputx:42:This line contains pattern not on a line by itself.
363 ./testdata/grepinputx-43-This is the last line of this file.
365 ---------------------------- Test 32 -----------------------------
366 ./testdata/grepinputx
368 ---------------------------- Test 33 -----------------------------
369 pcre2grep: Failed to open ./testdata/grepnonexist: No such file or directory
371 ---------------------------- Test 34 -----------------------------
373 ---------------------------- Test 35 -----------------------------
374 ./testdata/grepinput8
375 ./testdata/grepinputx
377 ---------------------------- Test 36 -----------------------------
378 ./testdata/grepinput3
379 ./testdata/grepinputx
381 ---------------------------- Test 37 -----------------------------
382 24KiB long so that it needs more than a single read() call to process it. New
387 ======== STDERR ========
388 pcre2grep: pcre2_match() gave error -47 while matching this text:
390 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
392 pcre2grep: pcre2_match() gave error -47 while matching this text:
394 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
396 pcre2grep: Error -46, -47, -53 or -63 means that a resource limit was exceeded.
397 pcre2grep: Check your regex for nested unlimited loops.
398 ---------------------------- Test 38 ------------------------------
399 This line contains a binary zero here >
\0< for testing.
401 ---------------------------- Test 39 ------------------------------
402 This is a line before the binary zero.
403 This line contains a binary zero here >
\0< for testing.
405 ---------------------------- Test 40 ------------------------------
406 This line contains a binary zero here >
\0< for testing.
407 This is a line after the binary zero.
409 ---------------------------- Test 41 ------------------------------
410 before the binary zero
411 after the binary zero
413 ---------------------------- Test 42 ------------------------------
414 ./testdata/grepinput:595:before the binary zero
415 ./testdata/grepinput:597:after the binary zero
417 ---------------------------- Test 43 ------------------------------
424 ---------------------------- Test 44 ------------------------------
430 ---------------------------- Test 45 ------------------------------
436 ---------------------------- Test 46 ------------------------------
437 pcre2grep: Error in 2nd command-line regex at offset 9: missing closing parenthesis
439 ---------------------------- Test 47 ------------------------------
442 ---------------------------- Test 48 ------------------------------
447 ---------------------------- Test 49 ------------------------------
451 PUT NEW DATA ABOVE THIS LINE.
453 ---------------------------- Test 50 ------------------------------
455 ---------------------------- Test 51 ------------------------------
457 This time it jumps and jumps and jumps.
458 This line contains \E and (regex) *meta* [characters].
459 The word is cat in this line
460 The caterpillar sat on the mat
461 The snowcat is not an animal
462 A buried feline in the syndicate
464 ---------------------------- Test 52 ------------------------------
465 fox
\e[1;31mjumps
\e[0m
466 This time it
\e[1;31mjumps
\e[0m and
\e[1;31mjumps
\e[0m and
\e[1;31mjumps
\e[0m.
468 ---------------------------- Test 53 ------------------------------
475 ---------------------------- Test 54 ------------------------------
482 ---------------------------- Test 55 -----------------------------
483 Here is the
\e[1;31mpattern
\e[0m again.
484 That time it was on a
\e[1;31mline by itself
\e[0m.
485 This line contains
\e[1;31mpattern
\e[0m not on a
\e[1;31mline by itself
\e[0m.
487 ---------------------------- Test 56 -----------------------------
488 ./testdata/grepinput:456
489 ./testdata/grepinput3:0
490 ./testdata/grepinput8:0
491 ./testdata/grepinputM:0
492 ./testdata/grepinputv:1
493 ./testdata/grepinputx:0
495 ---------------------------- Test 57 -----------------------------
496 ./testdata/grepinput:456
497 ./testdata/grepinputv:1
499 ---------------------------- Test 58 -----------------------------
500 PATTERN at the start of a line.
501 In the middle of a line, PATTERN appears.
502 Check up on PATTERN near the end.
504 ---------------------------- Test 59 -----------------------------
505 PATTERN at the start of a line.
506 In the middle of a line, PATTERN appears.
507 Check up on PATTERN near the end.
509 ---------------------------- Test 60 -----------------------------
510 PATTERN at the start of a line.
511 In the middle of a line, PATTERN appears.
512 Check up on PATTERN near the end.
514 ---------------------------- Test 61 -----------------------------
515 PATTERN at the start of a line.
516 In the middle of a line, PATTERN appears.
517 Check up on PATTERN near the end.
519 ---------------------------- Test 62 -----------------------------
520 pcre2grep: pcre2_match() gave error -47 while matching text that starts:
522 This is a file of miscellaneous text that is used as test data for checking
523 that the pcregrep command is working correctly. The file must be more than
524 24KiB long so that it needs more than a single re
526 pcre2grep: Error -46, -47, -53 or -63 means that a resource limit was exceeded.
527 pcre2grep: Check your regex for nested unlimited loops.
529 ---------------------------- Test 63 -----------------------------
530 pcre2grep: pcre2_match() gave error -53 while matching text that starts:
532 This is a file of miscellaneous text that is used as test data for checking
533 that the pcregrep command is working correctly. The file must be more than
534 24KiB long so that it needs more than a single re
536 pcre2grep: Error -46, -47, -53 or -63 means that a resource limit was exceeded.
537 pcre2grep: Check your regex for nested unlimited loops.
539 ---------------------------- Test 64 ------------------------------
542 ---------------------------- Test 65 ------------------------------
545 ---------------------------- Test 66 ------------------------------
547 ---------------------------- Test 67 ------------------------------
549 ---------------------------- Test 68 ------------------------------
552 ---------------------------- Test 69 -----------------------------
553 1:This is a second file of input for the pcregrep tests.
557 6:That time it was on a line by itself.
559 8:To pat or not to pat, that is the question.
564 13:That was a complete pair
565 14:of lines all by themselves.
570 19:And there they were again, to check line numbers.
593 43:This is the last line of this file.
595 ---------------------------- Test 70 -----------------------------
596 \e[1;31mtriple: t1_txt s1_tag s_txt p_tag p_txt o_tag o_txt
598 \e[0m
\e[1;31mtriple: t3_txt s2_tag s_txt p_tag p_txt o_tag o_txt
600 \e[0m
\e[1;31mtriple: t4_txt s1_tag s_txt p_tag p_txt o_tag o_txt
602 \e[0m
\e[1;31mtriple: t6_txt s2_tag s_txt p_tag p_txt o_tag o_txt
605 1:
\e[1;31mtriple: t1_txt s1_tag s_txt p_tag p_txt o_tag o_txt
607 \e[0m6:
\e[1;31mtriple: t3_txt s2_tag s_txt p_tag p_txt o_tag o_txt
609 \e[0m8:
\e[1;31mtriple: t4_txt s1_tag s_txt p_tag p_txt o_tag o_txt
611 \e[0m13:
\e[1;31mtriple: t6_txt s2_tag s_txt p_tag p_txt o_tag o_txt
614 triple: t1_txt s1_tag s_txt p_tag p_txt o_tag o_txt
616 triple: t3_txt s2_tag s_txt p_tag p_txt o_tag o_txt
618 triple: t4_txt s1_tag s_txt p_tag p_txt o_tag o_txt
620 triple: t6_txt s2_tag s_txt p_tag p_txt o_tag o_txt
623 1:triple: t1_txt s1_tag s_txt p_tag p_txt o_tag o_txt
625 6:triple: t3_txt s2_tag s_txt p_tag p_txt o_tag o_txt
627 8:triple: t4_txt s1_tag s_txt p_tag p_txt o_tag o_txt
629 13:triple: t6_txt s2_tag s_txt p_tag p_txt o_tag o_txt
632 ---------------------------- Test 71 -----------------------------
635 ---------------------------- Test 72 -----------------------------
636 \e[1;31m01
\e[0m0203040506
638 ---------------------------- Test 73 -----------------------------
641 ---------------------------- Test 74 -----------------------------
645 ---------------------------- Test 75 -----------------------------
646 \e[1;31m01
\e[0m
\e[1;31m02
\e[0m03040506
648 ---------------------------- Test 76 -----------------------------
652 ---------------------------- Test 77 -----------------------------
656 ---------------------------- Test 78 -----------------------------
657 \e[1;31m01
\e[0m02
\e[1;31m03
\e[0m040506
659 ---------------------------- Test 79 -----------------------------
663 ---------------------------- Test 80 -----------------------------
666 ---------------------------- Test 81 -----------------------------
667 \e[1;31m01
\e[0m0203040506
669 ---------------------------- Test 82 -----------------------------
672 ---------------------------- Test 83 -----------------------------
673 pcre2grep: line 4 of file ./testdata/grepinput3 is too long for the internal buffer
674 pcre2grep: the maximum buffer size is 100
675 pcre2grep: use the --max-buffer-size option to change it
677 ---------------------------- Test 84 -----------------------------
678 testdata/grepinputv:fox jumps
679 testdata/grepinputx:complete pair
680 testdata/grepinputx:That was a complete pair
681 testdata/grepinputx:complete pair
682 testdata/grepinput3:triple: t7_txt s1_tag s_txt p_tag p_txt o_tag o_txt
684 ---------------------------- Test 85 -----------------------------
685 ./testdata/grepinput3:Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
687 ---------------------------- Test 86 -----------------------------
688 Binary file ./testdata/grepbinary matches
690 ---------------------------- Test 87 -----------------------------
692 ---------------------------- Test 88 -----------------------------
693 Binary file ./testdata/grepbinary matches
695 ---------------------------- Test 89 -----------------------------
697 ---------------------------- Test 90 -----------------------------
699 ---------------------------- Test 91 -----------------------------
700 The quick brown f
\0x jumps over the lazy dog.
702 ---------------------------- Test 92 -----------------------------
703 The quick brown f
\0x jumps over the lazy dog.
705 ---------------------------- Test 93 -----------------------------
706 The quick brown f
\0x jumps over the lazy dog.
708 ---------------------------- Test 94 -----------------------------
709 ./testdata/grepinput8
710 ./testdata/grepinputx
712 ---------------------------- Test 95 -----------------------------
713 testdata/grepinputx:complete pair
714 testdata/grepinputx:That was a complete pair
715 testdata/grepinputx:complete pair
717 ---------------------------- Test 96 -----------------------------
718 ./testdata/grepinput3
719 ./testdata/grepinput8
720 ./testdata/grepinputx
722 ---------------------------- Test 97 -----------------------------
723 ./testdata/grepinput3
724 ./testdata/grepinputx
726 ---------------------------- Test 98 -----------------------------
727 ./testdata/grepinputx
729 ---------------------------- Test 99 -----------------------------
730 ./testdata/grepinput3
731 ./testdata/grepinputx
733 ---------------------------- Test 100 ------------------------------
734 ./testdata/grepinput:zerothe.
735 ./testdata/grepinput:zeroa
736 ./testdata/grepinput:zerothe.
738 ---------------------------- Test 101 ------------------------------
739 ./testdata/grepinput:
\e[1;31m.
\e[0m|
\e[1;31mzero
\e[0m|
\e[1;31mthe
\e[0m|
\e[1;31m.
\e[0m
740 ./testdata/grepinput:
\e[1;31mzero
\e[0m|
\e[1;31ma
\e[0m
741 ./testdata/grepinput:
\e[1;31m.
\e[0m|
\e[1;31mzero
\e[0m|
\e[1;31mthe
\e[0m|
\e[1;31m.
\e[0m
743 ---------------------------- Test 102 -----------------------------
751 ---------------------------- Test 103 -----------------------------
753 ---------------------------- Test 104 -----------------------------
761 ---------------------------- Test 105 -----------------------------
762 triple: t1_txt s1_tag s_txt p_tag p_txt o_tag o_txt
764 triple: t2_txt s1_tag s_txt p_tag p_txt o_tag
765 Lorem
\e[1;31mipsum
\e[0m dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
767 triple: t3_txt s2_tag s_txt p_tag p_txt o_tag o_txt
769 triple: t4_txt s1_tag s_txt p_tag p_txt o_tag o_txt
771 triple: t5_txt s1_tag s_txt p_tag p_txt o_tag
774 triple: t6_txt s2_tag s_txt p_tag p_txt o_tag o_txt
776 triple: t7_txt s1_tag s_txt p_tag p_txt o_tag o_txt
778 ---------------------------- Test 106 -----------------------------
781 ---------------------------- Test 107 -----------------------------
789 ---------------------------- Test 108 ------------------------------
791 ---------------------------- Test 109 -----------------------------
793 ---------------------------- Test 110 -----------------------------
810 ---------------------------- Test 111 -----------------------------
817 ---------------------------- Test 112 -----------------------------
824 ---------------------------- Test 113 -----------------------------
827 ---------------------------- Test 114 -----------------------------
828 testdata/grepinput:469
829 testdata/grepinput3:0
830 testdata/grepinput8:0
831 testdata/grepinputM:2
832 testdata/grepinputv:3
833 testdata/grepinputx:6
836 ---------------------------- Test 115 -----------------------------
837 testdata/grepinput:469
838 testdata/grepinputM:2
839 testdata/grepinputv:3
840 testdata/grepinputx:6
843 ---------------------------- Test 116 -----------------------------
846 ---------------------------- Test 117 -----------------------------
855 ---------------------------- Test 118 -----------------------------
859 ---------------------------- Test 119 -----------------------------
869 ---------------------------- Test 120 ------------------------------
870 ./testdata/grepinput:the binary zero.:zerothe.
871 ./testdata/grepinput:a binary zero:zeroa
872 ./testdata/grepinput:the binary zero.:zerothe.
874 ---------------------------- Test 121 -----------------------------
875 This line contains \E and (regex) *meta* [characters].
877 ---------------------------- Test 122 -----------------------------
879 The word is cat in this line
881 ---------------------------- Test 123 -----------------------------
883 The word is cat in this line
885 ---------------------------- Test 124 -----------------------------
886 3:
\e[1;31mstart end
\e[0m in between
\e[1;31mstart
887 end
\e[0m and following
888 7:
\e[1;31mstart end
\e[0m in between
\e[1;31mstart
889 end
\e[0m and following
\e[1;31mstart
891 11:
\e[1;31mstart end
\e[0m in between
\e[1;31mstart
894 16:
\e[1;31mstart end
\e[0m in between
\e[1;31mstart
897 3:
\e[1;31mstart end
\e[0m in between
\e[1;31mstart
898 end
\e[0m and following
901 7:
\e[1;31mstart end
\e[0m in between
\e[1;31mstart
902 end
\e[0m and following
\e[1;31mstart
905 11:
\e[1;31mstart end
\e[0m in between
\e[1;31mstart
909 15-** These two lines must be last.
910 16:
\e[1;31mstart end
\e[0m in between
\e[1;31mstart
913 3:start end in between start
915 7:start end in between start
916 end and following start
918 11:start end in between start
921 16:start end in between start
924 3:start end in between start
928 7:start end in between start
929 end and following start
932 11:start end in between start
936 15-** These two lines must be last.
937 16:start end in between start
940 ---------------------------- Test 125 -----------------------------
941 \e[1;31ma
\e[0m
\e[1;31mb
\e[0m
\e[1;31mc
\e[0m
\e[1;31md
\e[0m
943 \e[1;31ma
\e[0m
\e[1;31mb
\e[0m
\e[1;31mc
\e[0m
\e[1;31md
\e[0m
945 \e[1;31ma
\e[0mb
\e[1;31mc
\e[0md
947 \e[1;31ma
\e[0mb
\e[1;31mc
\e[0md
949 ---------------------------- Test 126 -----------------------------