/[pcre]/code/trunk/doc/perltest.txt
ViewVC logotype

Contents of /code/trunk/doc/perltest.txt

Parent Directory Parent Directory | Revision Log Revision Log


Revision 75 - (show annotations) (download)
Sat Feb 24 21:40:37 2007 UTC (7 years, 1 month ago) by nigel
File MIME type: text/plain
File size: 1669 byte(s)
Load pcre-5.0 into code/trunk.

1 The perltest program
2 --------------------
3
4 The perltest program tests Perl's regular expressions; it has the same
5 specification as pcretest, and so can be given identical input, except that
6 input patterns can be followed only by Perl's lower case modifiers and /+ (as
7 used by pcretest), which is recognized and handled by the program.
8
9 The data lines are processed as Perl double-quoted strings, so if they contain
10 " $ or @ characters, these have to be escaped. For this reason, all such
11 characters in testinput1 and testinput4 are escaped so that they can be used
12 for perltest as well as for pcretest. The special upper case pattern
13 modifiers such as /A that pcretest recognizes, and its special data line
14 escapes, are not used in these files. The output should be identical, apart
15 from the initial identifying banner.
16
17 The perltest script can also test UTF-8 features. It works as is for Perl 5.8
18 or higher. It recognizes the special modifier /8 that pcretest uses to invoke
19 UTF-8 functionality. The testinput4 file can be fed to perltest to run
20 compatible UTF-8 tests.
21
22 For Perl 5.6, perltest won't work unmodified for the UTF-8 tests. You need to
23 uncomment the "use utf8" lines that it contains. It is best to do this on a
24 copy of the script, because for non-UTF-8 tests, these lines should remain
25 commented out.
26
27 The other testinput files are not suitable for feeding to perltest, since they
28 make use of the special upper case modifiers and escapes that pcretest uses to
29 test some features of PCRE. Some of these files also contains malformed regular
30 expressions, in order to check that PCRE diagnoses them correctly.
31
32 Philip Hazel <ph10@cam.ac.uk>
33 September 2004

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12