3 # This file is generated by configure from RunTest.in. Make any changes
10 # Select which tests to run; if no selection, run all
19 while [ $# -gt 0 ] ; do
27 *) echo "Unknown test number $1"; exit 1;;
32 if [ "@UTF8@" = "" ] ; then
33 if [ $do5 = yes ] ; then
34 echo "Can't run test 5 because UFT8 support is not configured"
37 if [ $do6 = yes ] ; then
38 echo "Can't run test 6 because UFT8 support is not configured"
43 if [ $do1 = no -a $do2 = no -a $do3 = no -a $do4 = no -a\
44 $do5 = no -a $do6 = no ] ; then
49 if [ "@UTF8@" != "" ] ; then do5=yes; fi
50 if [ "@UTF8@" != "" ] ; then do6=yes; fi
53 # Primary test, Perl-compatible
55 if [ $do1 = yes ] ; then
56 echo "Testing main functionality (Perl compatible)"
57 ./pcretest testdata/testinput1 testtry
59 $cf testtry testdata/testoutput1
60 if [ $? != 0 ] ; then exit 1; fi
65 # PCRE tests that are not Perl-compatible - API & error tests, mostly
67 if [ $do2 = yes ] ; then
68 echo "Testing API and error handling (not Perl compatible)"
69 ./pcretest -i testdata/testinput2 testtry
71 $cf testtry testdata/testoutput2
72 if [ $? != 0 ] ; then exit 1; fi
77 # Additional Perl-compatible tests for Perl 5.005's new features
79 if [ $do3 = yes ] ; then
80 echo "Testing Perl 5.005 features (Perl 5.005 compatible)"
81 ./pcretest testdata/testinput3 testtry
83 $cf testtry testdata/testoutput3
84 if [ $? != 0 ] ; then exit 1; fi
89 if [ $do1 = yes -a $do2 = yes -a $do3 = yes ] ; then
91 echo "The three main tests all ran OK"
95 # Locale-specific tests, provided the "fr" locale is available
97 if [ $do4 = yes ] ; then
98 locale -a | grep '^fr$' >/dev/null
99 if [ $? -eq 0 ] ; then
100 echo "Testing locale-specific features (using 'fr' locale)"
101 ./pcretest testdata/testinput4 testtry
103 $cf testtry testdata/testoutput4
104 if [ $? != 0 ] ; then
106 echo "Locale test did not run entirely successfully."
107 echo "This usually means that there is a problem with the locale"
108 echo "settings rather than a bug in PCRE."
110 echo "Locale test ran OK"
116 echo "Cannot test locale-specific features - 'fr' locale not found,"
117 echo "or the \"locale\" command is not available to check for it."
122 # Additional tests for UTF8 support
124 if [ $do5 = yes ] ; then
125 echo "Testing experimental, incomplete UTF8 support (Perl compatible)"
126 ./pcretest testdata/testinput5 testtry
128 $cf testtry testdata/testoutput5
129 if [ $? != 0 ] ; then exit 1; fi
132 echo "UTF8 test ran OK"
136 if [ $do6 = yes ] ; then
137 echo "Testing API and internals for UTF8 support (not Perl compatible)"
138 ./pcretest testdata/testinput6 testtry
140 $cf testtry testdata/testoutput6
141 if [ $? != 0 ] ; then exit 1; fi
144 echo "UTF8 internals test ran OK"