• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1The perltest program
2--------------------
3
4The perltest.pl script tests Perl's regular expressions; it has the same
5specification as pcretest, and so can be given identical input, except that
6input patterns can be followed only by Perl's lower case modifiers and /+ (as
7used by pcretest), which is recognized and handled by the program.
8
9The 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
11characters in testinput1, testinput4, testinput6, and testinput11 are escaped
12so that they can be used for perltest as well as for pcretest. The special
13upper case pattern modifiers such as /A that pcretest recognizes, and its
14special data line escapes, are not used in these files. The output should be
15identical, apart from the initial identifying banner.
16
17The perltest.pl script can also test UTF-8 features. It recognizes the special
18modifier /8 that pcretest uses to invoke UTF-8 functionality. The testinput4
19and testinput6 files can be fed to perltest to run compatible UTF-8 tests.
20However, it is necessary to add "use utf8;" to the script to make this work
21correctly.
22
23The testinput11 file contains tests that use features of Perl 5.10, so does not
24work with Perl 5.8.
25
26The other testinput files are not suitable for feeding to perltest.pl, since
27they make use of the special upper case modifiers and escapes that pcretest
28uses to test some features of PCRE. Some of these files also contains malformed
29regular expressions, in order to check that PCRE diagnoses them correctly.
30
31Philip Hazel
32October 2009
33