157 |
fi |
fi |
158 |
fi |
fi |
159 |
|
|
160 |
# Locale-specific tests, provided the "fr_FR" locale is available. |
# Locale-specific tests, provided that either the "fr_FR" or the "french" |
161 |
# TODO: Try the locale name "french" instead - as used on Windows - but |
# locale is available. The former is the Unix-like standard; the latter is |
162 |
# this will mean modifying the input and output data. |
# for Windows. |
163 |
|
|
164 |
if [ $do3 = yes ] ; then |
if [ $do3 = yes ] ; then |
165 |
locale -a | grep '^fr_FR$' >/dev/null |
locale -a | grep '^fr_FR$' >/dev/null |
166 |
if [ $? -eq 0 ] ; then |
if [ $? -eq 0 ] ; then |
167 |
echo "Test 3: locale-specific features (using 'fr_FR' locale)" |
locale=fr_FR |
168 |
$valgrind ./pcretest -q $testdata/testinput3 testtry |
infile=$testdata/testinput3 |
169 |
|
outfile=$testdata/testoutput3 |
170 |
|
else |
171 |
|
locale -a | grep '^french$' >/dev/null |
172 |
|
if [ $? -eq 0 ] ; then |
173 |
|
locale=french |
174 |
|
sed 's/fr_FR/french/' $testdata/testinput3 >test3input |
175 |
|
sed 's/fr_FR/french/' $testdata/testoutput3 >test3output |
176 |
|
infile=test3input |
177 |
|
outfile=test3output |
178 |
|
else |
179 |
|
locale= |
180 |
|
fi |
181 |
|
fi |
182 |
|
|
183 |
|
if [ "$locale" != "" ] ; then |
184 |
|
echo "Test 3: locale-specific features (using '$locale' locale)" |
185 |
|
$valgrind ./pcretest -q $infile testtry |
186 |
if [ $? = 0 ] ; then |
if [ $? = 0 ] ; then |
187 |
$cf testtry $testdata/testoutput3 |
$cf testtry $outfile |
188 |
if [ $? != 0 ] ; then |
if [ $? != 0 ] ; then |
189 |
echo " " |
echo " " |
190 |
echo "Locale test did not run entirely successfully." |
echo "Locale test did not run entirely successfully." |
196 |
else exit 1 |
else exit 1 |
197 |
fi |
fi |
198 |
else |
else |
199 |
echo "Cannot test locale-specific features - 'fr_FR' locale not found," |
echo "Cannot test locale-specific features - neither the 'fr_FR' nor the" |
200 |
echo "or the \"locale\" command is not available to check for it." |
echo "'french' locale exists, or the \"locale\" command is not available" |
201 |
|
echo "to check for them." |
202 |
echo " " |
echo " " |
203 |
fi |
fi |
204 |
fi |
fi |