pcre2/testdata
Carlo Marcelo Arenas Belón 7db8784296
pcre2grep: correctly handle multiple passes (#35)
* tests: use a explicit filehandle to share in testing -m

The way stdin is shared to all participants of a subshell varies
per shell, and at least the standard /bin/sh in Solaris seem to
create a new copy for each command, defeating the purpose of the
test.

Use instead exec to create a filehandle that could then be used
explicitly in the test to confirm that the stream is set.

* pcre2grep: correctly handle multiple passes

When the -m option is used, pcre2grep is meant to exit after enough
matches are found but while leaving the stream pinned to the next position
after the last match.

Unfortunately, it wasn't tracking correctly the beginning of the stream
on subsequent passes, and therefore it will fail to use the right seek
value.

Grab the position of the stream at the beginning and while at it, make
sure that the stream passed hasn't been consumed already.
2021-11-09 16:57:48 +00:00
..
grepbinary Implement pcre2grep and its test. 2014-07-15 08:46:12 +00:00
grepfilelist Implement pcre2grep and its test. 2014-07-15 08:46:12 +00:00
grepinput More typos and changes to "Kibibytes" for "Kilobytes". 2018-06-18 14:03:33 +00:00
grepinput3 Implement pcre2grep and its test. 2014-07-15 08:46:12 +00:00
grepinput8 Fix pcre2grep loop provoked by \K in a lookbehind assertion in a non-anchored 2015-04-03 11:14:19 +00:00
grepinputM Fix multiple multiline matching issues in pcre2grep. 2017-11-13 16:52:39 +00:00
grepinputv Convert pcre2grep to use new pcre2_compile() options, thereby fixing two minor 2017-06-17 11:32:06 +00:00
grepinputx Implement pcre2grep and its test. 2014-07-15 08:46:12 +00:00
greplist Implement pcre2grep and its test. 2014-07-15 08:46:12 +00:00
grepoutput pcre2grep: correctly handle multiple passes (#35) 2021-11-09 16:57:48 +00:00
grepoutput8 pcre2grep update: -m and $x{..}, $o{..} escapes. Also some doc updates. 2020-10-04 16:34:31 +00:00
grepoutputC pcre2grep update: -m and $x{..}, $o{..} escapes. Also some doc updates. 2020-10-04 16:34:31 +00:00
grepoutputCN pcre2grep update: -m and $x{..}, $o{..} escapes. Also some doc updates. 2020-10-04 16:34:31 +00:00
grepoutputN Update RunGrepTest to use tr for handling binary zeros instead of sed, which it 2021-01-04 17:17:48 +00:00
greppatN4 Implement pcre2grep and its test. 2014-07-15 08:46:12 +00:00
testbtables Renamed dftables as pcre2_dftables and enable it to write the tables in binary. 2020-03-20 18:09:59 +00:00
testinput1 Add another test, tidy ChangeLog. 2021-02-19 12:05:57 +00:00
testinput2 Lock out \K in lookaround assertions by default, but provide an option to 2021-08-30 16:57:44 +01:00
testinput3 Remove unwanted trailing space in test data. 2016-01-07 16:08:44 +00:00
testinput4 Fix delimiters in tests 1 and 4 for correct Perl behaviour (Bugzilla #2641). 2020-09-13 15:56:32 +00:00
testinput5 Lock out \K in lookaround assertions by default, but provide an option to 2021-08-30 16:57:44 +01:00
testinput6 More partial match tweaks. 2019-07-22 16:30:44 +00:00
testinput7 Implement --never-backslash-C 2015-10-17 13:50:56 +00:00
testinput8 Implement support for invalid UTF in the pcre2_match() interpreter. 2019-05-24 17:15:48 +00:00
testinput9 Fix some numerical checking bugs, Bugzilla 2690. 2021-02-01 17:56:12 +00:00
testinput10 Fixed a word boundary check bug in JIT when partial matching is enabled. 2020-10-27 08:16:04 +00:00
testinput11 Fix some numerical checking bugs, Bugzilla 2690. 2021-02-01 17:56:12 +00:00
testinput12 Fix bugs in new UCP casing code for back references and characters with more 2020-02-26 16:53:39 +00:00
testinput13 All tests except JIT and save/reload are implemented. 2014-08-05 16:51:32 +00:00
testinput14 Unicode upper/lower casing is now used when UCP is set, even if UTF is not set. 2020-02-23 16:40:05 +00:00
testinput15 Fix allusedtext bug, rightmost consulted character incorrect in negative 2019-08-10 11:34:50 +00:00
testinput16 Runtime UTF checks now take not of the starting offset. 2015-08-18 10:34:05 +00:00
testinput17 Implement PCRE2_COPY_MATCHED_SUBJECT. 2018-10-17 08:33:38 +00:00
testinput18 Lock out \K in lookaround assertions by default, but provide an option to 2021-08-30 16:57:44 +01:00
testinput19 Implement REG_PEND (GNU extension) for the POSIX wrapper. 2017-06-05 18:25:47 +00:00
testinput20 Fix crash when more than one kind of "push" was set in pcre2test. 2017-05-06 16:56:07 +00:00
testinput21 Some tests were in the wrong files. 2015-12-15 18:21:49 +00:00
testinput22 Add another test. 2018-02-20 15:37:49 +00:00
testinput23 Implement --never-backslash-C 2015-10-17 13:50:56 +00:00
testinput24 Update convert tests so they run on Windows. 2017-06-24 15:54:14 +00:00
testinput25 Document experimental pattern conversion functions and remove unimplemented 2017-07-12 16:34:49 +00:00
testinputEBC Fix EBCDIC 0x41 omission and give error for \p and \P in a class when not 2015-06-19 16:41:22 +00:00
testoutput1 Add another test, tidy ChangeLog. 2021-02-19 12:05:57 +00:00
testoutput2 Lock out \K in lookaround assertions by default, but provide an option to 2021-08-30 16:57:44 +01:00
testoutput3 Allow non-ASCII in group names when UTF is set; revise group naming terminology 2019-02-06 18:11:36 +00:00
testoutput3A Allow non-ASCII in group names when UTF is set; revise group naming terminology 2019-02-06 18:11:36 +00:00
testoutput3B Allow non-ASCII in group names when UTF is set; revise group naming terminology 2019-02-06 18:11:36 +00:00
testoutput4 Fix delimiters in tests 1 and 4 for correct Perl behaviour (Bugzilla #2641). 2020-09-13 15:56:32 +00:00
testoutput5 Lock out \K in lookaround assertions by default, but provide an option to 2021-08-30 16:57:44 +01:00
testoutput6 More partial match tweaks. 2019-07-22 16:30:44 +00:00
testoutput7 Allow non-ASCII in group names when UTF is set; revise group naming terminology 2019-02-06 18:11:36 +00:00
testoutput8-8-2 Remove atomic restriction on capture groups containing recursive back 2019-12-18 16:16:12 +00:00
testoutput8-8-3 Some test files needed updating for link sizes 3 and 4. 2019-12-29 11:56:45 +00:00
testoutput8-8-4 Some test files needed updating for link sizes 3 and 4. 2019-12-29 11:56:45 +00:00
testoutput8-16-2 Remove atomic restriction on capture groups containing recursive back 2019-12-18 16:16:12 +00:00
testoutput8-16-3 Some test files needed updating for link sizes 3 and 4. 2019-12-29 11:56:45 +00:00
testoutput8-16-4 Some test files needed updating for link sizes 3 and 4. 2019-12-29 11:56:45 +00:00
testoutput8-32-2 Remove atomic restriction on capture groups containing recursive back 2019-12-18 16:16:12 +00:00
testoutput8-32-3 Some test files needed updating for link sizes 3 and 4. 2019-12-29 11:56:45 +00:00
testoutput8-32-4 Some test files needed updating for link sizes 3 and 4. 2019-12-29 11:56:45 +00:00
testoutput9 Fix some numerical checking bugs, Bugzilla 2690. 2021-02-01 17:56:12 +00:00
testoutput10 Fixed a word boundary check bug in JIT when partial matching is enabled. 2020-10-27 08:16:04 +00:00
testoutput11-16 Fix some numerical checking bugs, Bugzilla 2690. 2021-02-01 17:56:12 +00:00
testoutput11-32 Fix some numerical checking bugs, Bugzilla 2690. 2021-02-01 17:56:12 +00:00
testoutput12-16 Fix bugs in new UCP casing code for back references and characters with more 2020-02-26 16:53:39 +00:00
testoutput12-32 Fix bugs in new UCP casing code for back references and characters with more 2020-02-26 16:53:39 +00:00
testoutput13 All tests except JIT and save/reload are implemented. 2014-08-05 16:51:32 +00:00
testoutput14-8 Unicode upper/lower casing is now used when UCP is set, even if UTF is not set. 2020-02-23 16:40:05 +00:00
testoutput14-16 Fix bug in UTF-16 checker returning wrong offset for missing low surrogate. 2020-02-24 15:39:56 +00:00
testoutput14-32 Unicode upper/lower casing is now used when UCP is set, even if UTF is not set. 2020-02-23 16:40:05 +00:00
testoutput15 Back off failed attempt to handle nested lookbehinds for estimating how much of 2019-09-04 18:14:54 +00:00
testoutput16 Allow non-ASCII in group names when UTF is set; revise group naming terminology 2019-02-06 18:11:36 +00:00
testoutput17 Allow non-ASCII in group names when UTF is set; revise group naming terminology 2019-02-06 18:11:36 +00:00
testoutput18 Lock out \K in lookaround assertions by default, but provide an option to 2021-08-30 16:57:44 +01:00
testoutput19 Implement REG_PEND (GNU extension) for the POSIX wrapper. 2017-06-05 18:25:47 +00:00
testoutput20 Allow non-ASCII in group names when UTF is set; revise group naming terminology 2019-02-06 18:11:36 +00:00
testoutput21 Allow non-ASCII in group names when UTF is set; revise group naming terminology 2019-02-06 18:11:36 +00:00
testoutput22-8 Minor improvement to minimum length calculation. 2019-06-13 16:00:11 +00:00
testoutput22-16 Minor improvement to minimum length calculation. 2019-06-13 16:00:11 +00:00
testoutput22-32 Allow non-ASCII in group names when UTF is set; revise group naming terminology 2019-02-06 18:11:36 +00:00
testoutput23 Major refactoring of pcre2_compile.c; see ChangeLog and HACKING. 2016-10-02 16:01:01 +00:00
testoutput24 Update convert tests so they run on Windows. 2017-06-24 15:54:14 +00:00
testoutput25 Document experimental pattern conversion functions and remove unimplemented 2017-07-12 16:34:49 +00:00
testoutputEBC Add support for \N{U+dd...}, for ASCII and Unicode modes only. 2018-07-27 16:30:40 +00:00
valgrind-jit.supp Update valgrind parameters in RunGrepTest and arrange for the suppressions file 2016-05-31 11:36:10 +00:00
wintestinput3 Remove computing the JIT read-only data size in advance and use on-demand memory allocation. 2015-03-06 07:41:36 +00:00
wintestoutput3 Update Windows-specific test output (overlooked wording change). 2020-01-15 16:50:45 +00:00