3
# This file is generated by configure from RunTest.in. Make any changes
9
testdata=@top_srcdir@/testdata
11
# Select which tests to run; if no selection, run all
20
while [ $# -gt 0 ] ; do
28
*) echo "Unknown test number $1"; exit 1;;
33
if [ "@LINK_SIZE@" != "" -a "@LINK_SIZE@" != "-DLINK_SIZE=2" ] ; then
34
if [ $do2 = yes ] ; then
35
echo "Can't run test 2 with an internal link size other than 2"
38
if [ $do5 = yes ] ; then
39
echo "Can't run test 5 with an internal link size other than 2"
42
if [ $do6 = yes ] ; then
43
echo "Can't run test 6 with an internal link size other than 2"
48
if [ "@UTF8@" = "" ] ; then
49
if [ $do4 = yes ] ; then
50
echo "Can't run test 4 because UTF-8 support is not configured"
53
if [ $do5 = yes ] ; then
54
echo "Can't run test 5 because UTF-8 support is not configured"
57
if [ $do6 = yes ] ; then
58
echo "Can't run test 6 because UTF-8 support is not configured"
63
if [ "@UCP@" = "" ] ; then
64
if [ $do6 = yes ] ; then
65
echo "Can't run test 6 because Unicode property support is not configured"
70
if [ $do1 = no -a $do2 = no -a $do3 = no -a $do4 = no -a \
71
$do5 = no -a $do6 = no ] ; then
75
if [ "@UTF8@" != "" ] ; then do4=yes; fi
76
if [ "@UTF8@" != "" ] ; then do5=yes; fi
77
if [ "@UTF8@" != "" -a "@UCP@" != "" ] ; then do6=yes; fi
84
# Primary test, Perl-compatible
86
if [ $do1 = yes ] ; then
87
echo "Test 1: main functionality (Perl compatible)"
88
./pcretest $testdata/testinput1 testtry
90
$cf testtry $testdata/testoutput1
91
if [ $? != 0 ] ; then exit 1; fi
97
# PCRE tests that are not Perl-compatible - API & error tests, mostly
99
if [ $do2 = yes ] ; then
100
if [ "@LINK_SIZE@" = "" -o "@LINK_SIZE@" = "-DLINK_SIZE=2" ] ; then
101
echo "Test 2: API and error handling (not Perl compatible)"
102
./pcretest -i $testdata/testinput2 testtry
104
$cf testtry $testdata/testoutput2
105
if [ $? != 0 ] ; then exit 1; fi
109
echo Test 2 skipped for link size other than 2 \(@LINK_SIZE@\)
113
if [ $do1 = yes -a $do2 = yes ] ; then
115
echo "The two main tests ran OK"
119
# Locale-specific tests, provided the "fr_FR" locale is available
121
if [ $do3 = yes ] ; then
122
locale -a | grep '^fr_FR$' >/dev/null
123
if [ $? -eq 0 ] ; then
124
echo "Test 3: locale-specific features (using 'fr_FR' locale)"
125
./pcretest $testdata/testinput3 testtry
127
$cf testtry $testdata/testoutput3
128
if [ $? != 0 ] ; then
130
echo "Locale test did not run entirely successfully."
131
echo "This usually means that there is a problem with the locale"
132
echo "settings rather than a bug in PCRE."
134
echo "Locale test ran OK"
140
echo "Cannot test locale-specific features - 'fr_FR' locale not found,"
141
echo "or the \"locale\" command is not available to check for it."
146
# Additional tests for UTF8 support
148
if [ $do4 = yes ] ; then
149
echo "Test 4: UTF-8 support (Perl compatible)"
150
./pcretest $testdata/testinput4 testtry
152
$cf testtry $testdata/testoutput4
153
if [ $? != 0 ] ; then exit 1; fi
156
echo "UTF8 test ran OK"
160
if [ $do5 = yes ] ; then
161
if [ "@LINK_SIZE@" = "" -o "@LINK_SIZE@" = "-DLINK_SIZE=2" ] ; then
162
echo "Test 5: API and internals for UTF-8 support (not Perl compatible)"
163
./pcretest $testdata/testinput5 testtry
165
$cf testtry $testdata/testoutput5
166
if [ $? != 0 ] ; then exit 1; fi
169
echo "UTF8 internals test ran OK"
172
echo Test 5 skipped for link size other than 2 \(@LINK_SIZE@\)
176
if [ $do6 = yes ] ; then
177
if [ "@LINK_SIZE@" = "" -o "@LINK_SIZE@" = "-DLINK_SIZE=2" ] ; then
178
echo "Test 6: Unicode property support"
179
./pcretest $testdata/testinput6 testtry
181
$cf testtry $testdata/testoutput6
182
if [ $? != 0 ] ; then exit 1; fi
185
echo "Unicode properties test ran OK"
188
echo Test 6 skipped for link size other than 2 \(@LINK_SIZE@\)