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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 458 by ph10, Sat Oct 3 16:48:17 2009 UTC revision 691 by ph10, Sun Sep 11 14:31:21 2011 UTC
# Line 3  The perltest program Line 3  The perltest program
3    
4  The perltest.pl script tests Perl's regular expressions; it has the same  The perltest.pl script tests Perl's regular expressions; it has the same
5  specification as pcretest, and so can be given identical input, except that  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  input patterns can be followed only by Perl's lower case modifiers and certain
7  used by pcretest), which is recognized and handled by the program.  other pcretest modifiers that are either handled or ignored:
8    
9      /+   recognized and handled by perltest
10      /++  the second + is ignored
11      /8   recognized and handled by perltest
12      /J   ignored
13      /K   ignored
14      /W   ignored
15      /S   ignored
16      /SS  ignored
17    
18  The data lines are processed as Perl double-quoted strings, so if they contain  The data lines are processed as Perl double-quoted strings, so if they contain
19  " $ or @ characters, these have to be escaped. For this reason, all such  " $ or @ characters, these have to be escaped. For this reason, all such
20  characters in testinput1, testinput4, testinput6, and testinput11 are escaped  characters in testinput1, testinput4, testinput6, and testinput11 are escaped
21  so that they can be used for perltest as well as for pcretest. The special  so that they can be used for perltest as well as for pcretest. The pcretest \Y
22  upper case pattern modifiers such as /A that pcretest recognizes, and its  escape in data lines is removed.
23  special data line escapes, are not used in these files. The output should be  
24  identical, apart from the initial identifying banner.  The special upper case pattern modifiers such as /A that pcretest recognizes,
25    and its special data line escapes, are not used in these files. The output
26    should be identical, apart from the initial identifying banner.
27    
28  The perltest.pl script can also test UTF-8 features. It recognizes the special  The perltest.pl script can also test UTF-8 features. It recognizes the special
29  modifier /8 that pcretest uses to invoke UTF-8 functionality. The testinput4  modifier /8 that pcretest uses to invoke UTF-8 functionality. The testinput4
30  and testinput6 files can be fed to perltest to run compatible UTF-8 tests.  and testinput6 files can be fed to perltest to run compatible UTF-8 tests.
31  However, it is necessary to add "use utf8;" to the script to make this work  However, it is necessary to add "use utf8;" to the script to make this work
32  correctly.  correctly.
33    
34  The testinput11 file contains tests that use features of Perl 5.10, so does not  The testinput11 file contains tests that use features of Perl 5.10, so does not
35  work with Perl 5.8.  work with Perl 5.8.
36    
37  The other testinput files are not suitable for feeding to perltest.pl, since  The other testinput files are not suitable for feeding to perltest.pl, since
# Line 29  uses to test some features of PCRE. Some Line 40  uses to test some features of PCRE. Some
40  regular expressions, in order to check that PCRE diagnoses them correctly.  regular expressions, in order to check that PCRE diagnoses them correctly.
41    
42  Philip Hazel  Philip Hazel
43  October 2009  August 2011

Legend:
Removed from v.458  
changed lines
  Added in v.691

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12