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

Diff of /code/trunk/RunTest

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

revision 173 by ph10, Tue Jun 5 11:17:10 2007 UTC revision 835 by ph10, Wed Dec 28 16:10:09 2011 UTC
# Line 1  Line 1 
1  #! /bin/sh  #! /bin/sh
2    
3  # Run PCRE tests  # Run the PCRE tests using the pcretest program. The appropriate tests are
4    # selected, depending on which build-time options were used.
5    
6  cf="diff -u"  # All tests are now run both with and without -s, to ensure that everything is
7  valgrind=  # tested with and without studying. However, there are some tests that produce
8  testdata=testdata  # different output after studying, typically when we are tracing the actual
9    # matching process (for example, using auto-callouts). In these few cases, the
10  if [ -n "$srcdir" -a -d "$srcdir" ] ; then  # tests are duplicated in the files, one with /S to force studying always, and
11    testdata="$srcdir/testdata"  # one with /SS to force *not* studying always. The use of -s doesn't then make
12  fi  # any difference to their output. There is also one test which compiles invalid
13    # UTF-8 with the UTF-8 check turned off; for this, studying must also be
14  # Find which optional facilities are available  # disabled with /SS.
15    
16  case `./pcretest -C | ./pcregrep 'Internal link size'` in  # When JIT support is available, all the tests are also run with -s+ to test
17    *2) link_size=2;;  # (again, almost) everything with studying and the JIT option. There are also
18    *3) link_size=3;;  # two tests for JIT-specific features, one to be run when JIT support is
19    *4) link_size=4;;  # available, and one when it is not.
20     *) echo "Failed to find internal link size"; exit 1;;  
21  esac  # The arguments for this script can be individual test numbers, or the word
22    # "valgrind", or "sim" followed by an argument to run cross-compiled
23  ./pcretest -C | ./pcregrep 'No UTF-8 support' >/dev/null  # executables under a simulator, for example:
24  utf8=$?  #
25    # RunTest 3 sim "qemu-arm -s 8388608"
26    
27  ./pcretest -C | ./pcregrep 'No Unicode properties support' >/dev/null  valgrind=
28  ucp=$?  sim=
29    
30  # Select which tests to run; for those that are explicitly requested, check  # Select which tests to run; for those that are explicitly requested, check
31  # that the necessary optional facilities are available.  # that the necessary optional facilities are available.
# Line 38  do7=no Line 40  do7=no
40  do8=no  do8=no
41  do9=no  do9=no
42  do10=no  do10=no
43    do11=no
44    do12=no
45    do13=no
46    do14=no
47    do15=no
48    
49  while [ $# -gt 0 ] ; do  while [ $# -gt 0 ] ; do
50    case $1 in    case $1 in
# Line 51  while [ $# -gt 0 ] ; do Line 58  while [ $# -gt 0 ] ; do
58      8) do8=yes;;      8) do8=yes;;
59      9) do9=yes;;      9) do9=yes;;
60     10) do10=yes;;     10) do10=yes;;
61     valgrind) valgrind="valgrind -q";;     11) do11=yes;;
62       12) do12=yes;;
63       13) do13=yes;;
64       14) do14=yes;;
65       15) do15=yes;;
66       valgrind) valgrind="valgrind -q --smc-check=all";;
67       sim) shift; sim=$1;;
68      *) echo "Unknown test number $1"; exit 1;;      *) echo "Unknown test number $1"; exit 1;;
69    esac    esac
70    shift    shift
71  done  done
72    
73    # Set up a suitable "diff" command for comparison. Some systems
74    # have a diff that lacks a -u option. Try to deal with this.
75    
76    if diff -u /dev/null /dev/null; then cf="diff -u"; else cf="diff"; fi
77    
78    # Find the test data
79    
80    if [ -n "$srcdir" -a -d "$srcdir" ] ; then
81      testdata="$srcdir/testdata"
82    elif [ -d "./testdata" ] ; then
83      testdata=./testdata
84    elif [ -d "../testdata" ] ; then
85      testdata=../testdata
86    else
87      echo "Cannot find the testdata directory"
88      exit 1
89    fi
90    
91    # Find which optional facilities are available. In some Windows environments
92    # the output of pcretest -C has CRLF at the end of each line, but the shell
93    # strips only linefeeds from the output of a `backquoted` command. Hence the
94    # alternative patterns.
95    
96    case `$sim ./pcretest -C | $sim ./pcregrep 'Internal link size'` in
97      *2|*2[[:space:]]) link_size=2;;
98      *3|*3[[:space:]]) link_size=3;;
99      *4|*4[[:space:]]) link_size=4;;
100       *) echo "Failed to find internal link size"; exit 1;;
101    esac
102    
103    $sim ./pcretest -C | $sim ./pcregrep 'No UTF-8 support' >/dev/null
104    utf8=$?
105    
106    $sim ./pcretest -C | $sim ./pcregrep 'No Unicode properties support' >/dev/null
107    ucp=$?
108    
109    jitopt=
110    $sim ./pcretest -C | $sim ./pcregrep 'No just-in-time compiler support' \
111      >/dev/null
112    jit=$?
113    if [ $jit -ne 0 ] ; then
114      jitopt=-s+
115    fi
116    
117  if [ $utf8 -eq 0 ] ; then  if [ $utf8 -eq 0 ] ; then
118    if [ $do4 = yes ] ; then    if [ $do4 = yes ] ; then
119      echo "Can't run test 4 because UTF-8 support is not configured"      echo "Can't run test 4 because UTF-8 support is not configured"
# Line 70  if [ $utf8 -eq 0 ] ; then Line 127  if [ $utf8 -eq 0 ] ; then
127      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"
128      exit 1      exit 1
129    fi    fi
130      if [ $do12 = yes ] ; then
131        echo "Can't run test 12 because UTF-8 support is not configured"
132        exit 1
133      fi
134  fi  fi
135    
136  if [ $ucp -eq 0 ] ; then  if [ $ucp -eq 0 ] ; then
# Line 85  if [ $ucp -eq 0 ] ; then Line 146  if [ $ucp -eq 0 ] ; then
146      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"
147      exit 1      exit 1
148    fi    fi
149      if [ $do13 = yes ] ; then
150        echo "Can't run test 12 because Unicode property support is not configured"
151        exit 1
152      fi
153  fi  fi
154    
155  if [ $link_size -ne 2 ] ; then  if [ $link_size -ne 2 ] ; then
# Line 94  if [ $link_size -ne 2 ] ; then Line 159  if [ $link_size -ne 2 ] ; then
159    fi    fi
160  fi  fi
161    
162  # If no specific tests were requested, select all that are relevant.  if [ $jit -eq 0 ] ; then
163      if [ $do14 = "yes" ] ; then
164        echo "Can't run test 14 because JIT support is not configured"
165        exit 1
166      fi
167    else
168      if [ $do15 = "yes" ] ; then
169        echo "Can't run test 15 because JIT support is configured"
170        exit 1
171      fi
172    fi
173    
174    # If no specific tests were requested, select all. Those that are not
175    # relevant will be skipped.
176    
177  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 \
178       $do5 = no -a $do6 = no -a $do7 = no -a $do8 = no -a \       $do5  = no -a $do6  = no -a $do7  = no -a $do8  = no -a \
179       $do9 = no -a $do10 = no ] ; then       $do9  = no -a $do10 = no -a $do11 = no -a $do12 = no -a \
180         $do13 = no -a $do14 = no -a $do15 = no ] ; then
181    do1=yes    do1=yes
182    do2=yes    do2=yes
183    do3=yes    do3=yes
184    if [ $utf8 -ne 0 ] ; then do4=yes; fi    do4=yes
185    if [ $utf8 -ne 0 ] ; then do5=yes; fi    do5=yes
186    if [ $utf8 -ne 0 -a $ucp -ne 0 ] ; then do6=yes; fi    do6=yes
187    do7=yes    do7=yes
188    if [ $utf8 -ne 0 ] ; then do8=yes; fi    do8=yes
189    if [ $utf8 -ne 0 -a $ucp -ne 0 ] ; then do9=yes; fi    do9=yes
190    if [ $link_size -eq 2 -a $ucp -ne 0 ] ; then do10=yes; fi    do10=yes
191      do11=yes
192      do12=yes
193      do13=yes
194      do14=yes
195      do15=yes
196  fi  fi
197    
198  # Show which release  # Show which release and which test data
199    
200  echo ""  echo ""
201  echo PCRE C library tests  echo PCRE C library tests using test data from $testdata
202  ./pcretest /dev/null  $sim ./pcretest /dev/null
203    
204  # Primary test, Perl-compatible  # Primary test, compatible with JIT and all versions of Perl >= 5.8
205    
206  if [ $do1 = yes ] ; then  if [ $do1 = yes ] ; then
207    echo "Test 1: main functionality (Perl compatible)"    echo "Test 1: main functionality (Compatible with Perl >= 5.8)"
208    $valgrind ./pcretest -q $testdata/testinput1 testtry    for opt in "" "-s" $jitopt; do
209    if [ $? = 0 ] ; then      $sim $valgrind ./pcretest -q $opt $testdata/testinput1 testtry
210      $cf $testdata/testoutput1 testtry      if [ $? = 0 ] ; then
211      if [ $? != 0 ] ; then exit 1; fi        $cf $testdata/testoutput1 testtry
212    else exit 1        if [ $? != 0 ] ; then exit 1; fi
213    fi      else exit 1
214    echo "OK"      fi
215        if [ "$opt" = "-s" ] ; then echo "  OK with study"
216        elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"
217        else echo "  OK"
218        fi
219      done
220  fi  fi
221    
222  # PCRE tests that are not Perl-compatible - API & error tests, mostly  # PCRE tests that are not JIT or Perl-compatible: API, errors, internals
223    
224  if [ $do2 = yes ] ; then  if [ $do2 = yes ] ; then
225    echo "Test 2: API and error handling (not Perl compatible)"    echo "Test 2: API, errors, internals, and non-Perl stuff"
226    $valgrind ./pcretest -q $testdata/testinput2 testtry    for opt in "" "-s" $jitopt; do
227    if [ $? = 0 ] ; then      $sim $valgrind ./pcretest -q $opt $testdata/testinput2 testtry
228      $cf $testdata/testoutput2 testtry      if [ $? = 0 ] ; then
229      if [ $? != 0 ] ; then exit 1; fi        $cf $testdata/testoutput2 testtry
230    else exit 1        if [ $? != 0 ] ; then exit 1; fi
231    fi      else
232    echo "OK"        echo " "
233          echo "** Test 2 requires a lot of stack. If it has crashed with a"
234          echo "** segmentation fault, it may be that you do not have enough"
235          echo "** stack available by default. Please see the 'pcrestack' man"
236          echo "** page for a discussion of PCRE's stack usage."
237          echo " "
238          exit 1
239        fi
240        if [ "$opt" = "-s" ] ; then echo "  OK with study"
241        elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"
242        else echo "  OK"
243        fi
244      done
245  fi  fi
246    
247  # Locale-specific tests, provided that either the "fr_FR" or the "french"  # Locale-specific tests, provided that either the "fr_FR" or the "french"
248  # locale is available. The former is the Unix-like standard; the latter is  # locale is available. The former is the Unix-like standard; the latter is
249  # for Windows.  # for Windows. Another possibility is "fr", which needs to be run against
250    # the Windows-specific input and output files.
251    
252  if [ $do3 = yes ] ; then  if [ $do3 = yes ] ; then
253    locale -a | grep '^fr_FR$' >/dev/null    locale -a | grep '^fr_FR$' >/dev/null
# Line 154  if [ $do3 = yes ] ; then Line 256  if [ $do3 = yes ] ; then
256      infile=$testdata/testinput3      infile=$testdata/testinput3
257      outfile=$testdata/testoutput3      outfile=$testdata/testoutput3
258    else    else
259        infile=test3input
260        outfile=test3output
261      locale -a | grep '^french$' >/dev/null      locale -a | grep '^french$' >/dev/null
262      if [ $? -eq 0 ] ; then      if [ $? -eq 0 ] ; then
263        locale=french        locale=french
264        sed 's/fr_FR/french/' $testdata/testinput3 >test3input        sed 's/fr_FR/french/' $testdata/testinput3 >test3input
265        sed 's/fr_FR/french/' $testdata/testoutput3 >test3output        sed 's/fr_FR/french/' $testdata/testoutput3 >test3output
       infile=test3input  
       outfile=test3output  
266      else      else
267        locale=        locale -a | grep '^fr$' >/dev/null
268          if [ $? -eq 0 ] ; then
269            locale=fr
270            sed 's/fr_FR/fr/' $testdata/wintestinput3 >test3input
271            sed 's/fr_FR/fr/' $testdata/wintestoutput3 >test3output
272          else
273            locale=
274          fi
275      fi      fi
276    fi    fi
277    
278    if [ "$locale" != "" ] ; then    if [ "$locale" != "" ] ; then
279      echo "Test 3: locale-specific features (using '$locale' locale)"      echo "Test 3: locale-specific features (using '$locale' locale)"
280      $valgrind ./pcretest -q $infile testtry      for opt in "" "-s" $jitopt; do
281      if [ $? = 0 ] ; then        $sim $valgrind ./pcretest -q $opt $infile testtry
282        $cf $outfile testtry        if [ $? = 0 ] ; then
283        if [ $? != 0 ] ; then          $cf $outfile testtry
284          echo " "          if [ $? != 0 ] ; then
285          echo "Locale test did not run entirely successfully."            echo " "
286          echo "This usually means that there is a problem with the locale"            echo "Locale test did not run entirely successfully."
287          echo "settings rather than a bug in PCRE."            echo "This usually means that there is a problem with the locale"
288        else            echo "settings rather than a bug in PCRE."
289        echo "OK"            break;
290            else
291              if [ "$opt" = "-s" ] ; then echo "  OK with study"
292              elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"
293              else echo "  OK"
294              fi
295            fi
296          else exit 1
297        fi        fi
298      else exit 1      done
     fi  
299    else    else
300      echo "Cannot test locale-specific features - neither the 'fr_FR' nor the"      echo "Cannot test locale-specific features - none of the 'fr_FR', 'fr' or"
301      echo "'french' locale exists, or the \"locale\" command is not available"      echo "'french' locales exist, or the \"locale\" command is not available"
302      echo "to check for them."      echo "to check for them."
303      echo " "      echo " "
304    fi    fi
# Line 192  fi Line 307  fi
307  # Additional tests for UTF8 support  # Additional tests for UTF8 support
308    
309  if [ $do4 = yes ] ; then  if [ $do4 = yes ] ; then
310    echo "Test 4: UTF-8 support (Perl compatible)"    echo "Test 4: UTF-8 support (Compatible with Perl >= 5.8)"
311    $valgrind ./pcretest -q $testdata/testinput4 testtry    if [ $utf8 -eq 0 ] ; then
312    if [ $? = 0 ] ; then      echo "  Skipped because UTF-8 support is not available"
313      $cf $testdata/testoutput4 testtry    else
314      if [ $? != 0 ] ; then exit 1; fi      for opt in "" "-s" $jitopt; do
315    else exit 1        $sim $valgrind ./pcretest -q $opt $testdata/testinput4 testtry
316          if [ $? = 0 ] ; then
317            $cf $testdata/testoutput4 testtry
318            if [ $? != 0 ] ; then exit 1; fi
319          else exit 1
320          fi
321          if [ "$opt" = "-s" ] ; then echo "  OK with study"
322          elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"
323          else echo "  OK"
324          fi
325        done
326    fi    fi
   echo "OK"  
327  fi  fi
328    
329  if [ $do5 = yes ] ; then  if [ $do5 = yes ] ; then
330    echo "Test 5: API and internals for UTF-8 support (not Perl compatible)"    echo "Test 5: API, internals, and non-Perl stuff for UTF-8 support"
331    $valgrind ./pcretest -q $testdata/testinput5 testtry    if [ $utf8 -eq 0 ] ; then
332    if [ $? = 0 ] ; then      echo "  Skipped because UTF-8 support is not available"
333      $cf $testdata/testoutput5 testtry    else
334      if [ $? != 0 ] ; then exit 1; fi      for opt in "" "-s" $jitopt; do
335    else exit 1        $sim $valgrind ./pcretest -q $opt $testdata/testinput5 testtry
336          if [ $? = 0 ] ; then
337            $cf $testdata/testoutput5 testtry
338            if [ $? != 0 ] ; then exit 1; fi
339          else exit 1
340          fi
341          if [ "$opt" = "-s" ] ; then echo "  OK with study"
342          elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"
343          else echo "  OK"
344          fi
345        done
346    fi    fi
   echo "OK"  
347  fi  fi
348    
349  if [ $do6 = yes ] ; then  if [ $do6 = yes ] ; then
350    echo "Test 6: Unicode property support"    echo "Test 6: Unicode property support (Compatible with Perl >= 5.10)"
351    $valgrind ./pcretest -q $testdata/testinput6 testtry    if [ $utf8 -eq 0 -o $ucp -eq 0 ] ; then
352    if [ $? = 0 ] ; then      echo "  Skipped because Unicode property support is not available"
353      $cf $testdata/testoutput6 testtry    else
354      if [ $? != 0 ] ; then exit 1; fi      for opt in "" "-s" $jitopt; do
355    else exit 1        $sim $valgrind ./pcretest -q $opt $testdata/testinput6 testtry
356          if [ $? = 0 ] ; then
357            $cf $testdata/testoutput6 testtry
358            if [ $? != 0 ] ; then exit 1; fi
359          else exit 1
360          fi
361          if [ "$opt" = "-s" ] ; then echo "  OK with study"
362          elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"
363          else echo "  OK"
364          fi
365        done
366    fi    fi
   echo "OK"  
367  fi  fi
368    
369  # Tests for DFA matching support  # Tests for DFA matching support
370    
371  if [ $do7 = yes ] ; then  if [ $do7 = yes ] ; then
372    echo "Test 7: DFA matching"    echo "Test 7: DFA matching"
373    $valgrind ./pcretest -q -dfa $testdata/testinput7 testtry    for opt in "" "-s"; do
374    if [ $? = 0 ] ; then      $sim $valgrind ./pcretest -q $opt -dfa $testdata/testinput7 testtry
375      $cf $testdata/testoutput7 testtry      if [ $? = 0 ] ; then
376      if [ $? != 0 ] ; then exit 1; fi        $cf $testdata/testoutput7 testtry
377    else exit 1        if [ $? != 0 ] ; then exit 1; fi
378    fi      else exit 1
379    echo "OK"      fi
380        if [ "$opt" = "-s" ] ; then echo "  OK with study" ; else echo "  OK"; fi
381      done
382  fi  fi
383    
384  if [ $do8 = yes ] ; then  if [ $do8 = yes ] ; then
385    echo "Test 8: DFA matching with UTF-8"    echo "Test 8: DFA matching with UTF-8"
386    $valgrind ./pcretest -q -dfa $testdata/testinput8 testtry    if [ $utf8 -eq 0 ] ; then
387    if [ $? = 0 ] ; then      echo "  Skipped because UTF-8 support is not available"
388      $cf $testdata/testoutput8 testtry    else
389      if [ $? != 0 ] ; then exit 1; fi      for opt in "" "-s"; do
390    else exit 1        $sim $valgrind ./pcretest -q $opt -dfa $testdata/testinput8 testtry
391          if [ $? = 0 ] ; then
392            $cf $testdata/testoutput8 testtry
393            if [ $? != 0 ] ; then exit 1; fi
394          else exit 1
395          fi
396          if [ "$opt" = "-s" ] ; then echo "  OK with study" ; else echo "  OK"; fi
397        done
398    fi    fi
   echo "OK"  
399  fi  fi
400    
401  if [ $do9 = yes ] ; then  if [ $do9 = yes ] ; then
402    echo "Test 9: DFA matching with Unicode properties"    echo "Test 9: DFA matching with Unicode properties"
403    $valgrind ./pcretest -q -dfa $testdata/testinput9 testtry    if [ $utf8 -eq 0 -o $ucp -eq 0 ] ; then
404    if [ $? = 0 ] ; then      echo "  Skipped because Unicode property support is not available"
405      $cf $testdata/testoutput9 testtry    else
406      if [ $? != 0 ] ; then exit 1; fi      for opt in "" "-s"; do
407    else exit 1        $sim $valgrind ./pcretest -q $opt -dfa $testdata/testinput9 testtry
408          if [ $? = 0 ] ; then
409            $cf $testdata/testoutput9 testtry
410            if [ $? != 0 ] ; then exit 1; fi
411          else exit 1
412          fi
413          if [ "$opt" = "-s" ] ; then echo "  OK with study" ; else echo "  OK"; fi
414        done
415    fi    fi
   echo "OK"  
416  fi  fi
417    
418  # Test of internal offsets and code sizes. This test is run only when there  # Test of internal offsets and code sizes. This test is run only when there
# Line 267  fi Line 423  fi
423    
424  if [ $do10 = yes ] ; then  if [ $do10 = yes ] ; then
425    echo "Test 10: Internal offsets and code size tests"    echo "Test 10: Internal offsets and code size tests"
426    $valgrind ./pcretest -q $testdata/testinput10 testtry    if [ $link_size -ne 2 ] ; then
427    if [ $? = 0 ] ; then      echo "  Skipped because link size is not 2"
428      $cf $testdata/testoutput10 testtry    elif [ $ucp -eq 0 ] ; then
429      if [ $? != 0 ] ; then exit 1; fi      echo "  Skipped because Unicode property support is not available"
430    else exit 1    else
431        for opt in "" "-s"; do
432          $sim $valgrind ./pcretest -q $opt $testdata/testinput10 testtry
433          if [ $? = 0 ] ; then
434            $cf $testdata/testoutput10 testtry
435            if [ $? != 0 ] ; then exit 1; fi
436          else exit 1
437          fi
438          if [ "$opt" = "-s" ] ; then echo "  OK with study" ; else echo "  OK"; fi
439        done
440      fi
441    fi
442    
443    # Test of Perl >= 5.10 features without UTF8 support
444    
445    if [ $do11 = yes ] ; then
446      echo "Test 11: Features from Perl >= 5.10 without UTF8 support"
447      for opt in "" "-s" $jitopt; do
448        $sim $valgrind ./pcretest -q $opt $testdata/testinput11 testtry
449        if [ $? = 0 ] ; then
450          $cf $testdata/testoutput11 testtry
451          if [ $? != 0 ] ; then exit 1; fi
452        else exit 1
453        fi
454        if [ "$opt" = "-s" ] ; then echo "  OK with study"
455        elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"
456        else echo "  OK"
457        fi
458      done
459    fi
460    
461    # Test of Perl >= 5.10 features with UTF8 support
462    
463    if [ $do12 = yes ] ; then
464      echo "Test 12: Features from Perl >= 5.10 with UTF8 support"
465      if [ $utf8 -eq 0 ] ; then
466        echo "  Skipped because UTF-8 support is not available"
467      else
468        for opt in "" "-s" $jitopt; do
469          $sim $valgrind ./pcretest -q $opt $testdata/testinput12 testtry
470          if [ $? = 0 ] ; then
471            $cf $testdata/testoutput12 testtry
472            if [ $? != 0 ] ; then exit 1; fi
473          else exit 1
474          fi
475          if [ "$opt" = "-s" ] ; then echo "  OK with study"
476          elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"
477          else echo "  OK"
478          fi
479        done
480      fi
481    fi
482    
483    # Test non-Perl-compatible Unicode property support
484    
485    if [ $do13 = yes ] ; then
486      echo "Test 13: API, internals, and non-Perl stuff for Unicode property support"
487      if [ $utf8 -eq 0 -o $ucp -eq 0 ] ; then
488        echo "  Skipped because Unicode property support is not available"
489      else
490        for opt in "" "-s" $jitopt; do
491          $sim $valgrind ./pcretest -q $opt $testdata/testinput13 testtry
492          if [ $? = 0 ] ; then
493            $cf $testdata/testoutput13 testtry
494            if [ $? != 0 ] ; then exit 1; fi
495          else exit 1
496          fi
497          if [ "$opt" = "-s" ] ; then echo "  OK with study"
498          elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"
499          else echo "  OK"
500          fi
501        done
502      fi
503    fi
504    
505    # Test JIT-specific features when JIT is available
506    
507    if [ $do14 = yes ] ; then
508      echo "Test 14: JIT-specific features (JIT available)"
509      if [ $jit -eq 0 ] ; then
510        echo "  Skipped because JIT is not available or not usable"
511      else
512        $sim $valgrind ./pcretest -q $testdata/testinput14 testtry
513        if [ $? = 0 ] ; then
514          $cf $testdata/testoutput14 testtry
515          if [ $? != 0 ] ; then exit 1; fi
516        else exit 1
517        fi
518        echo "  OK"
519      fi
520    fi
521    
522    # Test JIT-specific features when JIT is not available
523    
524    if [ $do15 = yes ] ; then
525      echo "Test 15: JIT-specific features (JIT not available)"
526      if [ $jit -ne 0 ] ; then
527        echo "  Skipped because JIT is available"
528      else
529        $sim $valgrind ./pcretest -q $testdata/testinput15 testtry
530        if [ $? = 0 ] ; then
531          $cf $testdata/testoutput15 testtry
532          if [ $? != 0 ] ; then exit 1; fi
533        else exit 1
534        fi
535        echo "  OK"
536    fi    fi
   echo "OK"  
537  fi  fi
538    
539  # End  # End

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

  ViewVC Help
Powered by ViewVC 1.1.5