6 |
# Run PCRE tests |
# Run PCRE tests |
7 |
|
|
8 |
cf=diff |
cf=diff |
9 |
|
testdata=@top_srcdir@/testdata |
10 |
|
|
11 |
# Select which tests to run; if no selection, run all |
# Select which tests to run; if no selection, run all |
12 |
|
|
55 |
|
|
56 |
if [ $do1 = yes ] ; then |
if [ $do1 = yes ] ; then |
57 |
echo "Testing main functionality (Perl compatible)" |
echo "Testing main functionality (Perl compatible)" |
58 |
./pcretest testdata/testinput1 testtry |
./pcretest $testdata/testinput1 testtry |
59 |
if [ $? = 0 ] ; then |
if [ $? = 0 ] ; then |
60 |
$cf testtry testdata/testoutput1 |
$cf testtry $testdata/testoutput1 |
61 |
if [ $? != 0 ] ; then exit 1; fi |
if [ $? != 0 ] ; then exit 1; fi |
62 |
else exit 1 |
else exit 1 |
63 |
fi |
fi |
67 |
|
|
68 |
if [ $do2 = yes ] ; then |
if [ $do2 = yes ] ; then |
69 |
echo "Testing API and error handling (not Perl compatible)" |
echo "Testing API and error handling (not Perl compatible)" |
70 |
./pcretest -i testdata/testinput2 testtry |
./pcretest -i $testdata/testinput2 testtry |
71 |
if [ $? = 0 ] ; then |
if [ $? = 0 ] ; then |
72 |
$cf testtry testdata/testoutput2 |
$cf testtry $testdata/testoutput2 |
73 |
if [ $? != 0 ] ; then exit 1; fi |
if [ $? != 0 ] ; then exit 1; fi |
74 |
else exit 1 |
else exit 1 |
75 |
fi |
fi |
79 |
|
|
80 |
if [ $do3 = yes ] ; then |
if [ $do3 = yes ] ; then |
81 |
echo "Testing Perl 5.005 features (Perl 5.005 compatible)" |
echo "Testing Perl 5.005 features (Perl 5.005 compatible)" |
82 |
./pcretest testdata/testinput3 testtry |
./pcretest $testdata/testinput3 testtry |
83 |
if [ $? = 0 ] ; then |
if [ $? = 0 ] ; then |
84 |
$cf testtry testdata/testoutput3 |
$cf testtry $testdata/testoutput3 |
85 |
if [ $? != 0 ] ; then exit 1; fi |
if [ $? != 0 ] ; then exit 1; fi |
86 |
else exit 1 |
else exit 1 |
87 |
fi |
fi |
99 |
locale -a | grep '^fr$' >/dev/null |
locale -a | grep '^fr$' >/dev/null |
100 |
if [ $? -eq 0 ] ; then |
if [ $? -eq 0 ] ; then |
101 |
echo "Testing locale-specific features (using 'fr' locale)" |
echo "Testing locale-specific features (using 'fr' locale)" |
102 |
./pcretest testdata/testinput4 testtry |
./pcretest $testdata/testinput4 testtry |
103 |
if [ $? = 0 ] ; then |
if [ $? = 0 ] ; then |
104 |
$cf testtry testdata/testoutput4 |
$cf testtry $testdata/testoutput4 |
105 |
if [ $? != 0 ] ; then |
if [ $? != 0 ] ; then |
106 |
echo " " |
echo " " |
107 |
echo "Locale test did not run entirely successfully." |
echo "Locale test did not run entirely successfully." |
124 |
|
|
125 |
if [ $do5 = yes ] ; then |
if [ $do5 = yes ] ; then |
126 |
echo "Testing experimental, incomplete UTF8 support (Perl compatible)" |
echo "Testing experimental, incomplete UTF8 support (Perl compatible)" |
127 |
./pcretest testdata/testinput5 testtry |
./pcretest $testdata/testinput5 testtry |
128 |
if [ $? = 0 ] ; then |
if [ $? = 0 ] ; then |
129 |
$cf testtry testdata/testoutput5 |
$cf testtry $testdata/testoutput5 |
130 |
if [ $? != 0 ] ; then exit 1; fi |
if [ $? != 0 ] ; then exit 1; fi |
131 |
else exit 1 |
else exit 1 |
132 |
fi |
fi |
136 |
|
|
137 |
if [ $do6 = yes ] ; then |
if [ $do6 = yes ] ; then |
138 |
echo "Testing API and internals for UTF8 support (not Perl compatible)" |
echo "Testing API and internals for UTF8 support (not Perl compatible)" |
139 |
./pcretest testdata/testinput6 testtry |
./pcretest $testdata/testinput6 testtry |
140 |
if [ $? = 0 ] ; then |
if [ $? = 0 ] ; then |
141 |
$cf testtry testdata/testoutput6 |
$cf testtry $testdata/testoutput6 |
142 |
if [ $? != 0 ] ; then exit 1; fi |
if [ $? != 0 ] ; then exit 1; fi |
143 |
else exit 1 |
else exit 1 |
144 |
fi |
fi |