--- code/trunk/RunTest 2007/05/04 15:10:45 163 +++ code/trunk/RunTest 2007/05/04 15:11:14 164 @@ -37,6 +37,7 @@ do7=no do8=no do9=no +do10=no while [ $# -gt 0 ] ; do case $1 in @@ -49,7 +50,8 @@ 7) do7=yes;; 8) do8=yes;; 9) do9=yes;; - valgrind) valgrind="valgrind -q";; + 10) do10=yes;; + valgrind) valgrind="valgrind -q";; *) echo "Unknown test number $1"; exit 1;; esac shift @@ -87,13 +89,24 @@ echo "Can't run test 9 because Unicode property support is not configured" exit 1 fi + if [ $do10 = yes ] ; then + echo "Can't run test 10 because Unicode property support is not configured" + exit 1 + fi fi +if [ $link_size -ne 2 ] ; then + if [ $do10 = yes ] ; then + echo "Can't run test 10 because the link size ($link_size) is not 2" + exit 1 + fi +fi + # If no specific tests were requested, select all that are relevant. if [ $do1 = no -a $do2 = no -a $do3 = no -a $do4 = no -a \ $do5 = no -a $do6 = no -a $do7 = no -a $do8 = no -a \ - $do9 = no ] ; then + $do9 = no -a $do10 = no ] ; then do1=yes do2=yes do3=yes @@ -103,6 +116,7 @@ do7=yes if [ $utf8 -ne 0 ] ; then do8=yes; fi if [ $utf8 -ne 0 -a $ucp -ne 0 ] ; then do9=yes; fi + if [ $link_size -eq 2 ] ; then do10=yes; fi fi # Show which release @@ -253,4 +267,21 @@ echo "OK" fi +# Test of internal offsets and code sizes. This test is run only when there +# is Unicode property support and the link size is 2. The actual tests are +# mostly the same as in some of the above, but in this test we inspect some +# offsets and sizes that require a known link size. This is a doublecheck for +# the maintainer, just in case something changes unexpectely. + +if [ $do10 = yes ] ; then + echo "Test 10: Internal offsets and code size tests" + $valgrind ./pcretest -q $testdata/testinput10 testtry + if [ $? = 0 ] ; then + $cf $testdata/testoutput10 testtry + if [ $? != 0 ] ; then exit 1; fi + else exit 1 + fi + echo "OK" +fi + # End