/[pcre]/code/trunk/RunTest
ViewVC logotype

Diff of /code/trunk/RunTest

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 835 by ph10, Wed Dec 28 16:10:09 2011 UTC revision 836 by ph10, Wed Dec 28 17:16:11 2011 UTC
# Line 18  Line 18 
18  # two tests for JIT-specific features, one to be run when JIT support is  # two tests for JIT-specific features, one to be run when JIT support is
19  # available, and one when it is not.  # available, and one when it is not.
20    
21  # The arguments for this script can be individual test numbers, or the word  # Whichever of the 8-bit and 16-bit libraries exist are tested. It is also
22    # possible to select which to test by the arguments -8 or -16.
23    
24    # Other arguments for this script can be individual test numbers, or the word
25  # "valgrind", or "sim" followed by an argument to run cross-compiled  # "valgrind", or "sim" followed by an argument to run cross-compiled
26  # executables under a simulator, for example:  # executables under a simulator, for example:
27  #  #
# Line 26  Line 29 
29    
30  valgrind=  valgrind=
31  sim=  sim=
32    arg8=
33    arg16=
34    
35  # Select which tests to run; for those that are explicitly requested, check  # Select which tests to run; for those that are explicitly requested, check
36  # that the necessary optional facilities are available.  # that the necessary optional facilities are available.
# Line 45  do12=no Line 50  do12=no
50  do13=no  do13=no
51  do14=no  do14=no
52  do15=no  do15=no
53    do16=no
54    do17=no
55    do18=no
56    do19=no
57    do20=no
58    
59  while [ $# -gt 0 ] ; do  while [ $# -gt 0 ] ; do
60    case $1 in    case $1 in
# Line 63  while [ $# -gt 0 ] ; do Line 73  while [ $# -gt 0 ] ; do
73     13) do13=yes;;     13) do13=yes;;
74     14) do14=yes;;     14) do14=yes;;
75     15) do15=yes;;     15) do15=yes;;
76       16) do16=yes;;
77       17) do17=yes;;
78       18) do18=yes;;
79       19) do19=yes;;
80       20) do20=yes;;
81       -8) arg8=yes;;
82      -16) arg16=yes;;
83     valgrind) valgrind="valgrind -q --smc-check=all";;     valgrind) valgrind="valgrind -q --smc-check=all";;
84     sim) shift; sim=$1;;     sim) shift; sim=$1;;
85      *) echo "Unknown test number $1"; exit 1;;      *) echo "Unknown test number $1"; exit 1;;
# Line 93  fi Line 110  fi
110  # strips only linefeeds from the output of a `backquoted` command. Hence the  # strips only linefeeds from the output of a `backquoted` command. Hence the
111  # alternative patterns.  # alternative patterns.
112    
113  case `$sim ./pcretest -C | $sim ./pcregrep 'Internal link size'` in  $sim ./pcretest -C linksize >/dev/null
114    *2|*2[[:space:]]) link_size=2;;  link_size=$?
115    *3|*3[[:space:]]) link_size=3;;  if [ $link_size -lt 2 ] ; then
116    *4|*4[[:space:]]) link_size=4;;    echo "Failed to find internal link size"
117     *) echo "Failed to find internal link size"; exit 1;;    exit 1
118  esac  fi
119    if [ $link_size -gt 4 ] ; then
120      echo "Failed to find internal link size"
121      exit 1
122    fi
123    
124  $sim ./pcretest -C | $sim ./pcregrep 'No UTF-8 support' >/dev/null  # Both 8-bit and 16-bit character strings may be supported, but only one
125  utf8=$?  # need be.
126    
127  $sim ./pcretest -C | $sim ./pcregrep 'No Unicode properties support' >/dev/null  $sim ./pcretest -C pcre8 >/dev/null
128    support8=$?
129    $sim ./pcretest -C pcre16 >/dev/null
130    support16=$?
131    if [ $(( $support8 + $support16 )) -eq 2 ] ; then
132      test8=
133      test16=-16
134      if [ "$arg8" = yes -a "$arg16" != yes ] ; then
135        test16=skip
136      fi
137      if [ "$arg16" = yes -a "$arg8" != yes ] ; then
138        test8=skip
139      fi
140    else
141      if [ $support8 -ne 0 ] ; then
142        if [ "$arg16" = yes ] ; then
143          echo "Cannot run 16-bit library tests: 16-bit library not compiled"
144          exit 1
145        fi
146        test8=
147        test16=skip
148      else
149        if [ "$arg8" = yes ] ; then
150          echo "Cannot run 8-bit library tests: 8-bit library not compiled"
151          exit 1
152        fi
153        test8=skip
154        test16=-16
155      fi
156    fi
157    
158    # UTF support always applies to both bit sizes if both are supported; we can't
159    # have UTF-8 support without UTF-16 support (for example).
160    
161    $sim ./pcretest -C utf >/dev/null
162    utf=$?
163    
164    $sim ./pcretest -C ucp >/dev/null
165  ucp=$?  ucp=$?
166    
167  jitopt=  jitopt=
168  $sim ./pcretest -C | $sim ./pcregrep 'No just-in-time compiler support' \  $sim ./pcretest -C jit >/dev/null
   >/dev/null  
169  jit=$?  jit=$?
170  if [ $jit -ne 0 ] ; then  if [ $jit -ne 0 ] ; then
171    jitopt=-s+    jitopt=-s+
172  fi  fi
173    
174  if [ $utf8 -eq 0 ] ; then  if [ $utf -eq 0 ] ; then
175    if [ $do4 = yes ] ; then    if [ $do4 = yes ] ; then
176      echo "Can't run test 4 because UTF-8 support is not configured"      echo "Can't run test 4 because UTF support is not configured"
177      exit 1      exit 1
178    fi    fi
179    if [ $do5 = yes ] ; then    if [ $do5 = yes ] ; then
180      echo "Can't run test 5 because UTF-8 support is not configured"      echo "Can't run test 5 because UTF support is not configured"
181      exit 1      exit 1
182    fi    fi
183    if [ $do8 = yes ] ; then    if [ $do9 = yes ] ; then
184      echo "Can't run test 8 because UTF-8 support is not configured"      echo "Can't run test 8 because UTF support is not configured"
185      exit 1      exit 1
186    fi    fi
187    if [ $do12 = yes ] ; then    if [ $do15 = yes ] ; then
188      echo "Can't run test 12 because UTF-8 support is not configured"      echo "Can't run test 15 because UTF support is not configured"
189      exit 1      exit 1
190    fi    fi
191      if [ $do18 = yes ] ; then
192        echo "Can't run test 18 because UTF support is not configured"
193      fi
194  fi  fi
195    
196  if [ $ucp -eq 0 ] ; then  if [ $ucp -eq 0 ] ; then
# Line 138  if [ $ucp -eq 0 ] ; then Line 198  if [ $ucp -eq 0 ] ; then
198      echo "Can't run test 6 because Unicode property support is not configured"      echo "Can't run test 6 because Unicode property support is not configured"
199      exit 1      exit 1
200    fi    fi
201    if [ $do9 = yes ] ; then    if [ $do7 = yes ] ; then
202      echo "Can't run test 9 because Unicode property support is not configured"      echo "Can't run test 7 because Unicode property support is not configured"
203      exit 1      exit 1
204    fi    fi
205    if [ $do10 = yes ] ; then    if [ $do10 = yes ] ; then
206      echo "Can't run test 10 because Unicode property support is not configured"      echo "Can't run test 10 because Unicode property support is not configured"
207      exit 1      exit 1
208    fi    fi
209    if [ $do13 = yes ] ; then    if [ $do16 = yes ] ; then
210      echo "Can't run test 12 because Unicode property support is not configured"      echo "Can't run test 16 because Unicode property support is not configured"
211        exit 1
212      fi
213      if [ $do19 = yes ] ; then
214        echo "Can't run test 19 because Unicode property support is not configured"
215      exit 1      exit 1
216    fi    fi
217  fi  fi
218    
219  if [ $link_size -ne 2 ] ; then  if [ $link_size -ne 2 ] ; then
220    if [ $do10 = yes ] ; then    if [ $do11 = yes ] ; then
221      echo "Can't run test 10 because the link size ($link_size) is not 2"      echo "Can't run test 11 because the link size ($link_size) is not 2"
222      exit 1      exit 1
223    fi    fi
224  fi  fi
225    
226  if [ $jit -eq 0 ] ; then  if [ $jit -eq 0 ] ; then
227    if [ $do14 = "yes" ] ; then    if [ $do12 = "yes" ] ; then
228      echo "Can't run test 14 because JIT support is not configured"      echo "Can't run test 12 because JIT support is not configured"
229      exit 1      exit 1
230    fi    fi
231  else  else
232    if [ $do15 = "yes" ] ; then    if [ $do13 = "yes" ] ; then
233      echo "Can't run test 15 because JIT support is configured"      echo "Can't run test 13 because JIT support is configured"
234      exit 1      exit 1
235    fi    fi
236  fi  fi
# Line 177  fi Line 241  fi
241  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 \
242       $do5  = no -a $do6  = no -a $do7  = no -a $do8  = no -a \       $do5  = no -a $do6  = no -a $do7  = no -a $do8  = no -a \
243       $do9  = no -a $do10 = no -a $do11 = no -a $do12 = no -a \       $do9  = no -a $do10 = no -a $do11 = no -a $do12 = no -a \
244       $do13 = no -a $do14 = no -a $do15 = no ] ; then       $do13 = no -a $do14 = no -a $do15 = no -a $do16 = no -a \
245         $do17 = no -a $do18 = no -a $do19 = no -a $do20 = no ] ; then
246    do1=yes    do1=yes
247    do2=yes    do2=yes
248    do3=yes    do3=yes
# Line 193  if [ $do1  = no -a $do2  = no -a $do3  = Line 258  if [ $do1  = no -a $do2  = no -a $do3  =
258    do13=yes    do13=yes
259    do14=yes    do14=yes
260    do15=yes    do15=yes
261      do16=yes
262      do17=yes
263      do18=yes
264      do19=yes
265      do20=yes
266  fi  fi
267    
268  # Show which release and which test data  # Show which release and which test data
# Line 201  echo "" Line 271  echo ""
271  echo PCRE C library tests using test data from $testdata  echo PCRE C library tests using test data from $testdata
272  $sim ./pcretest /dev/null  $sim ./pcretest /dev/null
273    
274    for bmode in "$test8" "$test16"; do
275      case "$bmode" in
276        skip) continue;;
277        -16)  if [ "$test8" != "skip" ] ; then echo ""; fi
278              bits=16; echo "---- Testing 16-bit library ----"; echo "";;
279        *)    bits=8; echo "---- Testing 8-bit library ----"; echo "";;
280      esac
281    
282  # Primary test, compatible with JIT and all versions of Perl >= 5.8  # Primary test, compatible with JIT and all versions of Perl >= 5.8
283    
284  if [ $do1 = yes ] ; then  if [ $do1 = yes ] ; then
285    echo "Test 1: main functionality (Compatible with Perl >= 5.8)"    echo "Test 1: main functionality (Compatible with Perl >= 5.10)"
286    for opt in "" "-s" $jitopt; do    for opt in "" "-s" $jitopt; do
287      $sim $valgrind ./pcretest -q $opt $testdata/testinput1 testtry      $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput1 testtry
288      if [ $? = 0 ] ; then      if [ $? = 0 ] ; then
289        $cf $testdata/testoutput1 testtry        $cf $testdata/testoutput1 testtry
290        if [ $? != 0 ] ; then exit 1; fi        if [ $? != 0 ] ; then exit 1; fi
# Line 222  fi Line 300  fi
300  # PCRE tests that are not JIT or Perl-compatible: API, errors, internals  # PCRE tests that are not JIT or Perl-compatible: API, errors, internals
301    
302  if [ $do2 = yes ] ; then  if [ $do2 = yes ] ; then
303    echo "Test 2: API, errors, internals, and non-Perl stuff"    echo "Test 2: API, errors, internals, and non-Perl stuff (not UTF-$bits)"
304    for opt in "" "-s" $jitopt; do    for opt in "" "-s" $jitopt; do
305      $sim $valgrind ./pcretest -q $opt $testdata/testinput2 testtry      $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput2 testtry
306      if [ $? = 0 ] ; then      if [ $? = 0 ] ; then
307        $cf $testdata/testoutput2 testtry        $cf $testdata/testoutput2 testtry
308        if [ $? != 0 ] ; then exit 1; fi        if [ $? != 0 ] ; then exit 1; fi
# Line 278  if [ $do3 = yes ] ; then Line 356  if [ $do3 = yes ] ; then
356    if [ "$locale" != "" ] ; then    if [ "$locale" != "" ] ; then
357      echo "Test 3: locale-specific features (using '$locale' locale)"      echo "Test 3: locale-specific features (using '$locale' locale)"
358      for opt in "" "-s" $jitopt; do      for opt in "" "-s" $jitopt; do
359        $sim $valgrind ./pcretest -q $opt $infile testtry        $sim $valgrind ./pcretest -q $bmode $opt $infile testtry
360        if [ $? = 0 ] ; then        if [ $? = 0 ] ; then
361          $cf $outfile testtry          $cf $outfile testtry
362          if [ $? != 0 ] ; then          if [ $? != 0 ] ; then
# Line 304  if [ $do3 = yes ] ; then Line 382  if [ $do3 = yes ] ; then
382    fi    fi
383  fi  fi
384    
385  # Additional tests for UTF8 support  # Additional tests for UTF support
386    
387  if [ $do4 = yes ] ; then  if [ $do4 = yes ] ; then
388    echo "Test 4: UTF-8 support (Compatible with Perl >= 5.8)"    echo "Test 4: UTF-$bits support (Compatible with Perl >= 5.10)"
389    if [ $utf8 -eq 0 ] ; then    if [ $utf -eq 0 ] ; then
390      echo "  Skipped because UTF-8 support is not available"      echo "  Skipped because UTF-$bits support is not available"
391    else    else
392      for opt in "" "-s" $jitopt; do      for opt in "" "-s" $jitopt; do
393        $sim $valgrind ./pcretest -q $opt $testdata/testinput4 testtry        $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput4 testtry
394        if [ $? = 0 ] ; then        if [ $? = 0 ] ; then
395          $cf $testdata/testoutput4 testtry          $cf $testdata/testoutput4 testtry
396          if [ $? != 0 ] ; then exit 1; fi          if [ $? != 0 ] ; then exit 1; fi
# Line 327  if [ $do4 = yes ] ; then Line 405  if [ $do4 = yes ] ; then
405  fi  fi
406    
407  if [ $do5 = yes ] ; then  if [ $do5 = yes ] ; then
408    echo "Test 5: API, internals, and non-Perl stuff for UTF-8 support"    echo "Test 5: API, internals, and non-Perl stuff for UTF-$bits support"
409    if [ $utf8 -eq 0 ] ; then    if [ $utf -eq 0 ] ; then
410      echo "  Skipped because UTF-8 support is not available"      echo "  Skipped because UTF-$bits support is not available"
411    else    else
412      for opt in "" "-s" $jitopt; do      for opt in "" "-s" $jitopt; do
413        $sim $valgrind ./pcretest -q $opt $testdata/testinput5 testtry        $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput5 testtry
414        if [ $? = 0 ] ; then        if [ $? = 0 ] ; then
415          $cf $testdata/testoutput5 testtry          $cf $testdata/testoutput5 testtry
416          if [ $? != 0 ] ; then exit 1; fi          if [ $? != 0 ] ; then exit 1; fi
# Line 348  fi Line 426  fi
426    
427  if [ $do6 = yes ] ; then  if [ $do6 = yes ] ; then
428    echo "Test 6: Unicode property support (Compatible with Perl >= 5.10)"    echo "Test 6: Unicode property support (Compatible with Perl >= 5.10)"
429    if [ $utf8 -eq 0 -o $ucp -eq 0 ] ; then    if [ $utf -eq 0 -o $ucp -eq 0 ] ; then
430      echo "  Skipped because Unicode property support is not available"      echo "  Skipped because Unicode property support is not available"
431    else    else
432      for opt in "" "-s" $jitopt; do      for opt in "" "-s" $jitopt; do
433        $sim $valgrind ./pcretest -q $opt $testdata/testinput6 testtry        $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput6 testtry
434        if [ $? = 0 ] ; then        if [ $? = 0 ] ; then
435          $cf $testdata/testoutput6 testtry          $cf $testdata/testoutput6 testtry
436          if [ $? != 0 ] ; then exit 1; fi          if [ $? != 0 ] ; then exit 1; fi
# Line 366  if [ $do6 = yes ] ; then Line 444  if [ $do6 = yes ] ; then
444    fi    fi
445  fi  fi
446    
447  # Tests for DFA matching support  # Test non-Perl-compatible Unicode property support
448    
449  if [ $do7 = yes ] ; then  if [ $do7 = yes ] ; then
450    echo "Test 7: DFA matching"    echo "Test 7: API, internals, and non-Perl stuff for Unicode property support"
451      if [ $utf -eq 0 -o $ucp -eq 0 ] ; then
452        echo "  Skipped because Unicode property support is not available"
453      else
454        for opt in "" "-s" $jitopt; do
455          $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput7 testtry
456          if [ $? = 0 ] ; then
457            $cf $testdata/testoutput7 testtry
458            if [ $? != 0 ] ; then exit 1; fi
459          else exit 1
460          fi
461          if [ "$opt" = "-s" ] ; then echo "  OK with study"
462          elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"
463          else echo "  OK"
464          fi
465        done
466      fi
467    fi
468    
469    # Tests for DFA matching support
470    
471    if [ $do8 = yes ] ; then
472      echo "Test 8: DFA matching main functionality"
473    for opt in "" "-s"; do    for opt in "" "-s"; do
474      $sim $valgrind ./pcretest -q $opt -dfa $testdata/testinput7 testtry      $sim $valgrind ./pcretest -q $bmode $opt -dfa $testdata/testinput8 testtry
475      if [ $? = 0 ] ; then      if [ $? = 0 ] ; then
476        $cf $testdata/testoutput7 testtry        $cf $testdata/testoutput8 testtry
477        if [ $? != 0 ] ; then exit 1; fi        if [ $? != 0 ] ; then exit 1; fi
478      else exit 1      else exit 1
479      fi      fi
# Line 381  if [ $do7 = yes ] ; then Line 481  if [ $do7 = yes ] ; then
481    done    done
482  fi  fi
483    
484  if [ $do8 = yes ] ; then  if [ $do9 = yes ] ; then
485    echo "Test 8: DFA matching with UTF-8"    echo "Test 9: DFA matching with UTF-$bits"
486    if [ $utf8 -eq 0 ] ; then    if [ $utf -eq 0 ] ; then
487      echo "  Skipped because UTF-8 support is not available"      echo "  Skipped because UTF-$bits support is not available"
488    else    else
489      for opt in "" "-s"; do      for opt in "" "-s"; do
490        $sim $valgrind ./pcretest -q $opt -dfa $testdata/testinput8 testtry        $sim $valgrind ./pcretest -q $bmode $opt -dfa $testdata/testinput9 testtry
491        if [ $? = 0 ] ; then        if [ $? = 0 ] ; then
492          $cf $testdata/testoutput8 testtry          $cf $testdata/testoutput9 testtry
493          if [ $? != 0 ] ; then exit 1; fi          if [ $? != 0 ] ; then exit 1; fi
494        else exit 1        else exit 1
495        fi        fi
# Line 398  if [ $do8 = yes ] ; then Line 498  if [ $do8 = yes ] ; then
498    fi    fi
499  fi  fi
500    
501  if [ $do9 = yes ] ; then  if [ $do10 = yes ] ; then
502    echo "Test 9: DFA matching with Unicode properties"    echo "Test 10: DFA matching with Unicode properties"
503    if [ $utf8 -eq 0 -o $ucp -eq 0 ] ; then    if [ $utf -eq 0 -o $ucp -eq 0 ] ; then
504      echo "  Skipped because Unicode property support is not available"      echo "  Skipped because Unicode property support is not available"
505    else    else
506      for opt in "" "-s"; do      for opt in "" "-s"; do
507        $sim $valgrind ./pcretest -q $opt -dfa $testdata/testinput9 testtry        $sim $valgrind ./pcretest -q $bmode $opt -dfa $testdata/testinput10 testtry
508        if [ $? = 0 ] ; then        if [ $? = 0 ] ; then
509          $cf $testdata/testoutput9 testtry          $cf $testdata/testoutput10 testtry
510          if [ $? != 0 ] ; then exit 1; fi          if [ $? != 0 ] ; then exit 1; fi
511        else exit 1        else exit 1
512        fi        fi
# Line 419  fi Line 519  fi
519  # is Unicode property support and the link size is 2. The actual tests are  # is Unicode property support and the link size is 2. The actual tests are
520  # mostly the same as in some of the above, but in this test we inspect some  # mostly the same as in some of the above, but in this test we inspect some
521  # offsets and sizes that require a known link size. This is a doublecheck for  # offsets and sizes that require a known link size. This is a doublecheck for
522  # the maintainer, just in case something changes unexpectely.  # the maintainer, just in case something changes unexpectely. The output from
523    # this test is not the same in 8-bit and 16-bit modes.
524    
525  if [ $do10 = yes ] ; then  if [ $do11 = yes ] ; then
526    echo "Test 10: Internal offsets and code size tests"    echo "Test 11: Internal offsets and code size tests"
527    if [ $link_size -ne 2 ] ; then    if [ $link_size -ne 2 ] ; then
528      echo "  Skipped because link size is not 2"      echo "  Skipped because link size is not 2"
529    elif [ $ucp -eq 0 ] ; then    elif [ $ucp -eq 0 ] ; then
530      echo "  Skipped because Unicode property support is not available"      echo "  Skipped because Unicode property support is not available"
531    else    else
532      for opt in "" "-s"; do      for opt in "" "-s"; do
533        $sim $valgrind ./pcretest -q $opt $testdata/testinput10 testtry        $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput11 testtry
534        if [ $? = 0 ] ; then        if [ $? = 0 ] ; then
535          $cf $testdata/testoutput10 testtry          $cf $testdata/testoutput11-$bits testtry
536          if [ $? != 0 ] ; then exit 1; fi          if [ $? != 0 ] ; then exit 1; fi
537        else exit 1        else exit 1
538        fi        fi
# Line 440  if [ $do10 = yes ] ; then Line 541  if [ $do10 = yes ] ; then
541    fi    fi
542  fi  fi
543    
544  # Test of Perl >= 5.10 features without UTF8 support  # Test JIT-specific features when JIT is available
545    
546  if [ $do11 = yes ] ; then  if [ $do12 = yes ] ; then
547    echo "Test 11: Features from Perl >= 5.10 without UTF8 support"    echo "Test 12: JIT-specific features (JIT available)"
548    for opt in "" "-s" $jitopt; do    if [ $jit -eq 0 ] ; then
549      $sim $valgrind ./pcretest -q $opt $testdata/testinput11 testtry      echo "  Skipped because JIT is not available or not usable"
550      else
551        $sim $valgrind ./pcretest -q $bmode $testdata/testinput12 testtry
552      if [ $? = 0 ] ; then      if [ $? = 0 ] ; then
553        $cf $testdata/testoutput11 testtry        $cf $testdata/testoutput12 testtry
554        if [ $? != 0 ] ; then exit 1; fi        if [ $? != 0 ] ; then exit 1; fi
555      else exit 1      else exit 1
556      fi      fi
557      if [ "$opt" = "-s" ] ; then echo "  OK with study"      echo "  OK"
558      elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"    fi
     else echo "  OK"  
     fi  
   done  
559  fi  fi
560    
561  # Test of Perl >= 5.10 features with UTF8 support  # Test JIT-specific features when JIT is not available
562    
563  if [ $do12 = yes ] ; then  if [ $do13 = yes ] ; then
564    echo "Test 12: Features from Perl >= 5.10 with UTF8 support"    echo "Test 13: JIT-specific features (JIT not available)"
565    if [ $utf8 -eq 0 ] ; then    if [ $jit -ne 0 ] ; then
566      echo "  Skipped because UTF-8 support is not available"      echo "  Skipped because JIT is available"
567    else    else
568        $sim $valgrind ./pcretest -q $bmode $testdata/testinput13 testtry
569        if [ $? = 0 ] ; then
570          $cf $testdata/testoutput13 testtry
571          if [ $? != 0 ] ; then exit 1; fi
572        else exit 1
573        fi
574        echo "  OK"
575      fi
576    fi
577    
578    # Tests for 8-bit-specific features
579    
580    if [ "$do14" = yes ] ; then
581      echo "Test 14: specials for the basic 8-bit library"
582      if [ "$bits" = "16" ] ; then
583        echo "  Skipped when running 16-bit tests"
584      elif [ $utf -eq 0 ] ; then
585        echo "  Skipped because UTF-$bits support is not available"
586      else
587      for opt in "" "-s" $jitopt; do      for opt in "" "-s" $jitopt; do
588        $sim $valgrind ./pcretest -q $opt $testdata/testinput12 testtry        $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput14 testtry
589        if [ $? = 0 ] ; then        if [ $? = 0 ] ; then
590          $cf $testdata/testoutput12 testtry          $cf $testdata/testoutput14 testtry
591          if [ $? != 0 ] ; then exit 1; fi          if [ $? != 0 ] ; then exit 1; fi
592        else exit 1        else exit 1
593        fi        fi
# Line 480  if [ $do12 = yes ] ; then Line 599  if [ $do12 = yes ] ; then
599    fi    fi
600  fi  fi
601    
602  # Test non-Perl-compatible Unicode property support  # Tests for 8-bit-specific features (needs UTF-8 support)
603    
604  if [ $do13 = yes ] ; then  if [ "$do15" = yes ] ; then
605    echo "Test 13: API, internals, and non-Perl stuff for Unicode property support"    echo "Test 15: specials for the 8-bit library with UTF-8 support"
606    if [ $utf8 -eq 0 -o $ucp -eq 0 ] ; then    if [ "$bits" = "16" ] ; then
607        echo "  Skipped when running 16-bit tests"
608      elif [ $utf -eq 0 ] ; then
609        echo "  Skipped because UTF-$bits support is not available"
610      else
611        for opt in "" "-s" $jitopt; do
612          $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput15 testtry
613          if [ $? = 0 ] ; then
614            $cf $testdata/testoutput15 testtry
615            if [ $? != 0 ] ; then exit 1; fi
616          else exit 1
617          fi
618          if [ "$opt" = "-s" ] ; then echo "  OK with study"
619          elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"
620          else echo "  OK"
621          fi
622        done
623      fi
624    fi
625    
626    # Tests for 8-bit-specific features (Unicode property support)
627    
628    if [ $do16 = yes ] ; then
629      echo "Test 16: specials for the 8-bit library with Unicode propery support"
630      if [ "$bits" = "16" ] ; then
631        echo "  Skipped when running 16-bit tests"
632      elif [ $ucp -eq 0 ] ; then
633      echo "  Skipped because Unicode property support is not available"      echo "  Skipped because Unicode property support is not available"
634    else    else
635      for opt in "" "-s" $jitopt; do      for opt in "" "-s" $jitopt; do
636        $sim $valgrind ./pcretest -q $opt $testdata/testinput13 testtry        $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput16 testtry
637        if [ $? = 0 ] ; then        if [ $? = 0 ] ; then
638          $cf $testdata/testoutput13 testtry          $cf $testdata/testoutput16 testtry
639          if [ $? != 0 ] ; then exit 1; fi          if [ $? != 0 ] ; then exit 1; fi
640        else exit 1        else exit 1
641        fi        fi
# Line 502  if [ $do13 = yes ] ; then Line 647  if [ $do13 = yes ] ; then
647    fi    fi
648  fi  fi
649    
650  # Test JIT-specific features when JIT is available  # Tests for 16-bit-specific features
651    
652  if [ $do14 = yes ] ; then  if [ $do17 = yes ] ; then
653    echo "Test 14: JIT-specific features (JIT available)"    echo "Test 17: specials for the basic 16-bit library"
654    if [ $jit -eq 0 ] ; then    if [ "$bits" = "8" ] ; then
655      echo "  Skipped because JIT is not available or not usable"      echo "  Skipped when running 8-bit tests"
656    else    else
657      $sim $valgrind ./pcretest -q $testdata/testinput14 testtry      for opt in "" "-s" $jitopt; do
658      if [ $? = 0 ] ; then        $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput17 testtry
659        $cf $testdata/testoutput14 testtry        if [ $? = 0 ] ; then
660        if [ $? != 0 ] ; then exit 1; fi          $cf $testdata/testoutput17 testtry
661      else exit 1          if [ $? != 0 ] ; then exit 1; fi
662      fi        else exit 1
663      echo "  OK"        fi
664          if [ "$opt" = "-s" ] ; then echo "  OK with study"
665          elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"
666          else echo "  OK"
667          fi
668        done
669    fi    fi
670  fi  fi
671    
672  # Test JIT-specific features when JIT is not available  # Tests for 16-bit-specific features (UTF-16 support)
673    
674  if [ $do15 = yes ] ; then  if [ $do18 = yes ] ; then
675    echo "Test 15: JIT-specific features (JIT not available)"    echo "Test 18: specials for the 16-bit library with UTF-16 support"
676    if [ $jit -ne 0 ] ; then    if [ "$bits" = "8" ] ; then
677      echo "  Skipped because JIT is available"      echo "  Skipped when running 8-bit tests"
678    else    elif [ $utf -eq 0 ] ; then
679      $sim $valgrind ./pcretest -q $testdata/testinput15 testtry      echo "  Skipped because UTF-$bits support is not available"
680      if [ $? = 0 ] ; then    else
681        $cf $testdata/testoutput15 testtry      for opt in "" "-s" $jitopt; do
682        if [ $? != 0 ] ; then exit 1; fi        $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput18 testtry
683      else exit 1        if [ $? = 0 ] ; then
684      fi          $cf $testdata/testoutput18 testtry
685      echo "  OK"          if [ $? != 0 ] ; then exit 1; fi
686          else exit 1
687          fi
688          if [ "$opt" = "-s" ] ; then echo "  OK with study"
689          elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"
690          else echo "  OK"
691          fi
692        done
693      fi
694    fi
695    
696    # Tests for 16-bit-specific features (Unicode property support)
697    
698    if [ $do19 = yes ] ; then
699      echo "Test 19: specials for the 16-bit library with Unicode propery support"
700      if [ "$bits" = "8" ] ; then
701        echo "  Skipped when running 8-bit tests"
702      elif [ $ucp -eq 0 ] ; then
703        echo "  Skipped because Unicode property support is not available"
704      else
705        for opt in "" "-s" $jitopt; do
706          $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput19 testtry
707          if [ $? = 0 ] ; then
708            $cf $testdata/testoutput19 testtry
709            if [ $? != 0 ] ; then exit 1; fi
710          else exit 1
711          fi
712          if [ "$opt" = "-s" ] ; then echo "  OK with study"
713          elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"
714          else echo "  OK"
715          fi
716        done
717    fi    fi
718  fi  fi
719    
720    # Tests for 16-bit-specific features in DFA non-UTF-16 mode
721    
722    if [ $do20 = yes ] ; then
723      echo "Test 20: DFA specials for the basic 16-bit library"
724      if [ "$bits" = "8" ] ; then
725        echo "  Skipped when running 8-bit tests"
726      else
727        for opt in "" "-s"; do
728          $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput20 testtry
729          if [ $? = 0 ] ; then
730            $cf $testdata/testoutput20 testtry
731            if [ $? != 0 ] ; then exit 1; fi
732          else exit 1
733          fi
734          if [ "$opt" = "-s" ] ; then echo "  OK with study"
735          else echo "  OK"
736          fi
737        done
738      fi
739    fi
740    
741    # End of loop for 8-bit/16-bit tests
742    done
743    
744  # End  # End

Legend:
Removed from v.835  
changed lines
  Added in v.836

  ViewVC Help
Powered by ViewVC 1.1.5