| 37 |
do7=no |
do7=no |
| 38 |
do8=no |
do8=no |
| 39 |
do9=no |
do9=no |
| 40 |
|
do10=no |
| 41 |
|
|
| 42 |
while [ $# -gt 0 ] ; do |
while [ $# -gt 0 ] ; do |
| 43 |
case $1 in |
case $1 in |
| 50 |
7) do7=yes;; |
7) do7=yes;; |
| 51 |
8) do8=yes;; |
8) do8=yes;; |
| 52 |
9) do9=yes;; |
9) do9=yes;; |
| 53 |
valgrind) valgrind="valgrind -q";; |
10) do10=yes;; |
| 54 |
|
valgrind) valgrind="valgrind -q";; |
| 55 |
*) echo "Unknown test number $1"; exit 1;; |
*) echo "Unknown test number $1"; exit 1;; |
| 56 |
esac |
esac |
| 57 |
shift |
shift |
| 66 |
echo "Can't run test 5 because UTF-8 support is not configured" |
echo "Can't run test 5 because UTF-8 support is not configured" |
| 67 |
exit 1 |
exit 1 |
| 68 |
fi |
fi |
|
if [ $do6 = yes ] ; then |
|
|
echo "Can't run test 6 because UTF-8 support is not configured" |
|
|
exit 1 |
|
|
fi |
|
| 69 |
if [ $do8 = yes ] ; then |
if [ $do8 = yes ] ; then |
| 70 |
echo "Can't run test 8 because UTF-8 support is not configured" |
echo "Can't run test 8 because UTF-8 support is not configured" |
| 71 |
exit 1 |
exit 1 |
| 72 |
fi |
fi |
|
if [ $do9 = yes ] ; then |
|
|
echo "Can't run test 9 because UTF-8 support is not configured" |
|
|
exit 1 |
|
|
fi |
|
| 73 |
fi |
fi |
| 74 |
|
|
| 75 |
if [ $ucp -eq 0 ] ; then |
if [ $ucp -eq 0 ] ; then |
| 81 |
echo "Can't run test 9 because Unicode property support is not configured" |
echo "Can't run test 9 because Unicode property support is not configured" |
| 82 |
exit 1 |
exit 1 |
| 83 |
fi |
fi |
| 84 |
|
if [ $do10 = yes ] ; then |
| 85 |
|
echo "Can't run test 10 because Unicode property support is not configured" |
| 86 |
|
exit 1 |
| 87 |
|
fi |
| 88 |
|
fi |
| 89 |
|
|
| 90 |
|
if [ $link_size -ne 2 ] ; then |
| 91 |
|
if [ $do10 = yes ] ; then |
| 92 |
|
echo "Can't run test 10 because the link size ($link_size) is not 2" |
| 93 |
|
exit 1 |
| 94 |
|
fi |
| 95 |
fi |
fi |
| 96 |
|
|
| 97 |
# If no specific tests were requested, select all that are relevant. |
# If no specific tests were requested, select all that are relevant. |
| 98 |
|
|
| 99 |
if [ $do1 = no -a $do2 = no -a $do3 = no -a $do4 = no -a \ |
if [ $do1 = no -a $do2 = no -a $do3 = no -a $do4 = no -a \ |
| 100 |
$do5 = no -a $do6 = no -a $do7 = no -a $do8 = no -a \ |
$do5 = no -a $do6 = no -a $do7 = no -a $do8 = no -a \ |
| 101 |
$do9 = no ] ; then |
$do9 = no -a $do10 = no ] ; then |
| 102 |
do1=yes |
do1=yes |
| 103 |
do2=yes |
do2=yes |
| 104 |
do3=yes |
do3=yes |
| 108 |
do7=yes |
do7=yes |
| 109 |
if [ $utf8 -ne 0 ] ; then do8=yes; fi |
if [ $utf8 -ne 0 ] ; then do8=yes; fi |
| 110 |
if [ $utf8 -ne 0 -a $ucp -ne 0 ] ; then do9=yes; fi |
if [ $utf8 -ne 0 -a $ucp -ne 0 ] ; then do9=yes; fi |
| 111 |
|
if [ $link_size -eq 2 -a $ucp -ne 0 ] ; then do10=yes; fi |
| 112 |
fi |
fi |
| 113 |
|
|
| 114 |
# Show which release |
# Show which release |
| 259 |
echo "OK" |
echo "OK" |
| 260 |
fi |
fi |
| 261 |
|
|
| 262 |
|
# Test of internal offsets and code sizes. This test is run only when there |
| 263 |
|
# is Unicode property support and the link size is 2. The actual tests are |
| 264 |
|
# mostly the same as in some of the above, but in this test we inspect some |
| 265 |
|
# offsets and sizes that require a known link size. This is a doublecheck for |
| 266 |
|
# the maintainer, just in case something changes unexpectely. |
| 267 |
|
|
| 268 |
|
if [ $do10 = yes ] ; then |
| 269 |
|
echo "Test 10: Internal offsets and code size tests" |
| 270 |
|
$valgrind ./pcretest -q $testdata/testinput10 testtry |
| 271 |
|
if [ $? = 0 ] ; then |
| 272 |
|
$cf $testdata/testoutput10 testtry |
| 273 |
|
if [ $? != 0 ] ; then exit 1; fi |
| 274 |
|
else exit 1 |
| 275 |
|
fi |
| 276 |
|
echo "OK" |
| 277 |
|
fi |
| 278 |
|
|
| 279 |
# End |
# End |