diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2014-08-02 14:17:32 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2014-08-02 14:17:32 +0000 |
commit | 844c971d8aeb2693bc01739963f5da675b989d03 (patch) | |
tree | e32898f45b61f668ad805fdb4e9c9c2ea50c43bd /plugins/Pcre16/docs/doc/perltest.txt | |
parent | ad8bc05808c6d1f45fb1d62500b4b30f0d654ed7 (diff) |
added pcre16 project
git-svn-id: http://svn.miranda-ng.org/main/trunk@10019 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Pcre16/docs/doc/perltest.txt')
-rw-r--r-- | plugins/Pcre16/docs/doc/perltest.txt | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/plugins/Pcre16/docs/doc/perltest.txt b/plugins/Pcre16/docs/doc/perltest.txt new file mode 100644 index 0000000000..bb1a52a48e --- /dev/null +++ b/plugins/Pcre16/docs/doc/perltest.txt @@ -0,0 +1,42 @@ +The perltest program +-------------------- + +The perltest.pl script tests Perl's regular expressions; it has the same +specification as pcretest, and so can be given identical input, except that +input patterns can be followed only by Perl's lower case modifiers and certain +other pcretest modifiers that are either handled or ignored: + + /+ recognized and handled by perltest + /++ the second + is ignored + /8 recognized and handled by perltest + /J ignored + /K ignored + /W ignored + /S ignored + /SS ignored + /Y ignored + +The pcretest \Y escape in data lines is removed before matching. The data lines +are processed as Perl double-quoted strings, so if they contain " $ or @ +characters, these have to be escaped. For this reason, all such characters in +the Perl-compatible testinput1 file are escaped so that they can be used for +perltest as well as for pcretest. The special upper case pattern modifiers such +as /A that pcretest recognizes, and its special data line escapes, are not used +in the Perl-compatible test file. The output should be identical, apart from +the initial identifying banner. + +The perltest.pl script can also test UTF-8 features. It recognizes the special +modifier /8 that pcretest uses to invoke UTF-8 functionality. The testinput4 +and testinput6 files can be fed to perltest to run compatible UTF-8 tests. +However, it is necessary to add "use utf8; require Encode" to the script to +make this work correctly. I have not managed to find a way to handle this +automatically. + +The other testinput files are not suitable for feeding to perltest.pl, since +they make use of the special upper case modifiers and escapes that pcretest +uses to test certain features of PCRE. Some of these files also contain +malformed regular expressions, in order to check that PCRE diagnoses them +correctly. + +Philip Hazel +January 2012 |