Commit Graph

31 Commits

Author SHA1 Message Date
Nicholas Wilson
e0918c0b7c XXX temp changes to perltest 2025-06-02 08:17:41 +00:00
Nicholas Wilson
0d0ac3aa0f Update EBCDIC support to support testing on normal ASCII systems (#656)
The pcre2test utility needs quite a few changes to accommodate this.
It is simpler to add a new mode to it, than to make it fully
EBCDIC-native. On an ASCII system, pcre2test performs ASCII I/O, but
tranlates the input when passing it to the fully-EBCDIC-supporting
library.
2025-02-12 22:31:00 +00:00
Carlo Marcelo Arenas Belón
295f94cf90 perltest: add support for locale modifier (#534)
Use a similar syntax to pcre2test to set a per pattern locale, and
teach pcre2test to recognize the modifier as perl compatible.

While at it, update tests and fix a recent regresion that wasn't
covered by them.
2024-10-21 14:54:34 +01:00
Carlo Marcelo Arenas Belón
1e09555d69 perltest: add support for hex modifier (#529)
* pcre2test: tighten \N{U+hh...} support

When \N{U+hh...} was added it was meant to support all unicode
characters that can be encoded by pcre2test and Perl, but its
use outside what is officially considered valid can be confusing
so print a warning for those cases.

* perltest: add support for hex modifier

The use of \xhh can be ambiguous when used together with the utf modifier,
so allow for describing code points individually in the pattern using hex,
with the same syntax that is already supported by pcre2test.
2024-10-17 16:42:31 +01:00
Carlo Marcelo Arenas Belón
03be4d2d7f pcre2test: add support for \N{U+hh...} escapes in subject (#528)
When providing escaped values in the subject, the syntax can be
ambiguous, so add support for a new escape that is always meant
to refer to a Unicode character and that is already supported
by the library in utf mode.

While at it, refactor the code to support octal escapes and fix
bugs with overlong numbers, as well to simplify the logic that
decides if an escape is encoded as a code unit or as an Unicode
character, that could require multiple code units.
2024-10-16 15:23:57 +01:00
Philip Hazel
c9bf83398a Update perltest.sh to support specifying a locale. 2024-10-11 17:44:47 +01:00
Carlo Marcelo Arenas Belón
c0d86f7d21 pcre2test: tighten \x{...} parsing in subject (#504)
Eventhough it is documented that invalid escapes will be reported,
the code would fallback in that case and result in a NUL being
generated whenever an incompete \x{ escape was being parsed.

Refactor the code to report the error instead and fix the logic used
for overlong numbers so that the truncation doesn't result in an
unexpected value being used.

There was an old (from PCRE 4.0) test that was affected but which is
no longer relevant, because it could only be triggered with invalid
UTF (which isn't supported), and that was therefore removed as a
result.

Additionally, it was found that the same syntax error was affecting
perltest so correct that as well by reporting syntax errors in the
subject lines.

While at it update related documentation for Perl's compatibility.
2024-10-02 12:13:37 +01:00
Carlo Marcelo Arenas Belón
29494c1dfd ci: add perl DEV job (#505)
Validates Perl compatibility
2024-09-30 16:05:45 +01:00
Philip Hazel
1e78b77382 Code for variable-length lookbehinds 2023-08-06 15:42:55 +01:00
Edward Betts
db53e4007d Correct spelling mistakes (#143) 2022-08-19 08:56:03 +01:00
Philip.Hazel
5652d41209 Fix delimiters in tests 1 and 4 for correct Perl behaviour (Bugzilla #2641).
Also move \K in lookaround tests to test 2 (Perl no longer supports).
2020-09-13 15:56:32 +00:00
Philip.Hazel
4543001e85 In perltest.sh, show Perl version in current conventional format. 2019-07-09 14:20:45 +00:00
Philip.Hazel
7375089fa5 More file tidies for 10.33-RC1 2019-03-04 18:07:04 +00:00
Philip.Hazel
866750fd53 Basic "script run" implementation. Not yet complete, and not yet documented. 2018-10-02 15:25:58 +00:00
Philip.Hazel
f26b0b0bae Implement Perl 5.28's alphabetic lookaround syntax, e.g. (*pla:...) and also
(*atomic:...).
2018-09-24 16:23:53 +00:00
Philip.Hazel
392974a0cb File tidies and documentation update for 10.32-RC1 Release Candidate. 2018-08-13 11:57:09 +00:00
Philip.Hazel
f8a18f65be Allow for #pattern -no_start_optimize in perltest script. 2018-07-27 16:42:25 +00:00
Philip.Hazel
192b82cf6e Allow :NAME on (*ACCEPT), (*FAIL), and (*COMMIT) and fix bug with (*MARK)
followed by (*ACCEPT) in an assertion. More small updates to perltest.sh.
2018-07-21 14:34:51 +00:00
Philip.Hazel
635d04fbb7 Upgrade perltest.sh to support (some) #pattern modifiers. 2018-07-17 16:00:09 +00:00
Philip.Hazel
a0e367f5b6 Update Perl tester to allow for optimization to be turned off. Required moving
some tests out of the Perl-compatible files.
2018-07-14 16:16:51 +00:00
Philip.Hazel
7db5904b9f Documentation and tests update and minor tweak to perltest.sh. 2018-07-12 17:04:43 +00:00
Philip.Hazel
fabea723cf Typos in documentation and comments noted by Jason Hood. 2018-06-17 14:13:28 +00:00
Philip.Hazel
810d9b6da5 Code tidies for 10.30-RC1 release candidate. 2017-07-19 16:04:15 +00:00
Philip.Hazel
6e30ed1b40 Add subject_literal and allow jitstack in pcre2test pattern modifiers, and add
another big pattern test.
2017-06-12 17:48:03 +00:00
Philip.Hazel
99264dfc23 Major refactoring of pcre2_compile.c; see ChangeLog and HACKING. 2016-10-02 16:01:01 +00:00
Philip.Hazel
dffd559601 File tidies, version updates, etc. for 10.21-RC1 2015-12-17 18:44:06 +00:00
Philip.Hazel
36db5a4d5f Implement comment lines in subject strings in pcre2test (and perltest.sh) input files. 2015-09-14 15:10:19 +00:00
Philip.Hazel
76a2e62669 Maintenance on tests for Perl compatibility 2015-08-03 17:25:55 +00:00
Philip.Hazel
d4d9ca954d Buglet fixed. 2014-11-05 16:05:43 +00:00
Philip.Hazel
08e3107cbe Changed jit_stack_alloc to jit_stack_create. 2014-11-03 17:13:00 +00:00
Philip.Hazel
b23ec7e1f5 More per-function documentation; revised perltest.sh replaces perltest.pl. 2014-10-25 14:16:46 +00:00