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

Diff of /code/trunk/RunTest

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

revision 159 by ph10, Wed May 2 10:27:18 2007 UTC revision 766 by ph10, Fri Nov 25 10:04:12 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    # executables under a simulator, for example:
24    #
25    # RunTest 3 sim "qemu-arm -s 8388608"
26    
27  ./pcretest -C | ./pcregrep 'No UTF-8 support' >/dev/null  valgrind=
28  utf8=$?  sim=
   
 ./pcretest -C | ./pcregrep 'No Unicode properties support' >/dev/null  
 ucp=$?  
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 37  do6=no Line 39  do6=no
39  do7=no  do7=no
40  do8=no  do8=no
41  do9=no  do9=no
42    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 49  while [ $# -gt 0 ] ; do Line 57  while [ $# -gt 0 ] ; do
57      7) do7=yes;;      7) do7=yes;;
58      8) do8=yes;;      8) do8=yes;;
59      9) do9=yes;;      9) do9=yes;;
60      valgrind) valgrind="valgrind -q";;     10) do10=yes;;
61       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  if [ "$link_size" != "2" ] ; then  # Set up a suitable "diff" command for comparison. Some systems
74    if [ $do2 = yes ] ; then  # have a diff that lacks a -u option. Try to deal with this.
75      echo "Can't run test 2 with an internal link size other than 2"  
76      exit 1  if diff -u /dev/null /dev/null; then cf="diff -u"; else cf="diff"; fi
77    fi  
78    if [ $do5 = yes ] ; then  # Find the test data
79      echo "Can't run test 5 with an internal link size other than 2"  
80      exit 1  if [ -n "$srcdir" -a -d "$srcdir" ] ; then
81    fi    testdata="$srcdir/testdata"
82    if [ $do6 = yes ] ; then  elif [ -d "./testdata" ] ; then
83      echo "Can't run test 6 with an internal link size other than 2"    testdata=./testdata
84      exit 1  elif [ -d "../testdata" ] ; then
85    fi    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  fi
116    
117  if [ $utf8 -eq 0 ] ; then  if [ $utf8 -eq 0 ] ; then
# Line 79  if [ $utf8 -eq 0 ] ; then Line 123  if [ $utf8 -eq 0 ] ; then
123      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"
124      exit 1      exit 1
125    fi    fi
   if [ $do6 = yes ] ; then  
     echo "Can't run test 6 because UTF-8 support is not configured"  
     exit 1  
   fi  
126    if [ $do8 = yes ] ; then    if [ $do8 = yes ] ; 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 [ $do9 = yes ] ; then    if [ $do12 = yes ] ; then
131      echo "Can't run test 9 because UTF-8 support is not configured"      echo "Can't run test 12 because UTF-8 support is not configured"
132      exit 1      exit 1
133    fi    fi
134  fi  fi
# Line 102  if [ $ucp -eq 0 ] ; then Line 142  if [ $ucp -eq 0 ] ; then
142      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"
143      exit 1      exit 1
144    fi    fi
145      if [ $do10 = yes ] ; then
146        echo "Can't run test 10 because Unicode property support is not configured"
147        exit 1
148      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 no specific tests were requested, select all that are relevant.  if [ $link_size -ne 2 ] ; then
156      if [ $do10 = yes ] ; then
157        echo "Can't run test 10 because the link size ($link_size) is not 2"
158        exit 1
159      fi
160    fi
161    
162  if [ $do1 = no -a $do2 = no -a $do3 = no -a $do4 = no -a \  if [ $jit -eq 0 ] ; then
163       $do5 = no -a $do6 = no -a $do7 = no -a $do8 = no -a \    if [ $do14 = "yes" ] ; then
164       $do9 = no ] ; then      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 \
178         $do5  = no -a $do6  = no -a $do7  = no -a $do8  = no -a \
179         $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      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    if [ "$link_size" = "2" ] ; then    echo "Test 2: API, errors, internals, and non-Perl stuff (not UTF-8)"
226      echo "Test 2: API and error handling (not Perl compatible)"    for opt in "" "-s" $jitopt; do
227      $valgrind ./pcretest -q $testdata/testinput2 testtry      $sim $valgrind ./pcretest -q $opt $testdata/testinput2 testtry
228      if [ $? = 0 ] ; then      if [ $? = 0 ] ; then
229        $cf $testdata/testoutput2 testtry        $cf $testdata/testoutput2 testtry
230        if [ $? != 0 ] ; then exit 1; fi        if [ $? != 0 ] ; then exit 1; fi
231      else exit 1      else
232          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      fi
240      echo "OK"      if [ "$opt" = "-s" ] ; then echo "  OK with study"
241    else      elif [ "$opt" = "-s+" ] ; then echo "  OK with JIT study"
242      echo Test 2 skipped for link size other than 2 \($link_size\)      else echo "  OK"
243      echo " "      fi
244    fi    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 168  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 206  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    if [ "$link_size" = "2" ] ; then    echo "Test 5: API, internals, and non-Perl stuff for UTF-8 support"
331      echo "Test 5: API and internals for UTF-8 support (not Perl compatible)"    if [ $utf8 -eq 0 ] ; then
332      $valgrind ./pcretest -q $testdata/testinput5 testtry      echo "  Skipped because UTF-8 support is not available"
333      else
334        for opt in "" "-s" $jitopt; do
335          $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
347    fi
348    
349    if [ $do6 = yes ] ; then
350      echo "Test 6: Unicode property support (Compatible with Perl >= 5.10)"
351      if [ $utf8 -eq 0 -o $ucp -eq 0 ] ; then
352        echo "  Skipped because Unicode property support is not available"
353      else
354        for opt in "" "-s" $jitopt; do
355          $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
367    fi
368    
369    # Tests for DFA matching support
370    
371    if [ $do7 = yes ] ; then
372      echo "Test 7: DFA matching"
373      for opt in "" "-s"; do
374        $sim $valgrind ./pcretest -q $opt -dfa $testdata/testinput7 testtry
375      if [ $? = 0 ] ; then      if [ $? = 0 ] ; then
376        $cf $testdata/testoutput5 testtry        $cf $testdata/testoutput7 testtry
377        if [ $? != 0 ] ; then exit 1; fi        if [ $? != 0 ] ; then exit 1; fi
378      else exit 1      else exit 1
379      fi      fi
380      echo "OK"      if [ "$opt" = "-s" ] ; then echo "  OK with study" ; else echo "  OK"; fi
381      done
382    fi
383    
384    if [ $do8 = yes ] ; then
385      echo "Test 8: DFA matching with UTF-8"
386      if [ $utf8 -eq 0 ] ; then
387        echo "  Skipped because UTF-8 support is not available"
388    else    else
389      echo Test 5 skipped for link size other than 2 \($link_size\)      for opt in "" "-s"; do
390      echo " "        $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
399  fi  fi
400    
401  if [ $do6 = yes ] ; then  if [ $do9 = yes ] ; then
402    if [ "$link_size" = "2" ] ; then    echo "Test 9: DFA matching with Unicode properties"
403      echo "Test 6: Unicode property support"    if [ $utf8 -eq 0 -o $ucp -eq 0 ] ; then
404      $valgrind ./pcretest -q $testdata/testinput6 testtry      echo "  Skipped because Unicode property support is not available"
405      else
406        for opt in "" "-s"; do
407          $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
416    fi
417    
418    # Test of internal offsets and code sizes. This test is run only when there
419    # is Unicode property support and the link size is 2. The actual tests are
420    # mostly the same as in some of the above, but in this test we inspect some
421    # offsets and sizes that require a known link size. This is a doublecheck for
422    # the maintainer, just in case something changes unexpectely.
423    
424    if [ $do10 = yes ] ; then
425      echo "Test 10: Internal offsets and code size tests"
426      if [ $link_size -ne 2 ] ; then
427        echo "  Skipped because link size is not 2"
428      elif [ $ucp -eq 0 ] ; then
429        echo "  Skipped because Unicode property support is not available"
430      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      if [ $? = 0 ] ; then
450        $cf $testdata/testoutput6 testtry        $cf $testdata/testoutput11 testtry
451        if [ $? != 0 ] ; then exit 1; fi        if [ $? != 0 ] ; then exit 1; fi
452      else exit 1      else exit 1
453      fi      fi
454      echo "OK"      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    else
468      echo Test 6 skipped for link size other than 2 \($link_size\)      for opt in "" "-s" $jitopt; do
469      echo " "        $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    fi
481  fi  fi
482    
483  # Tests for DFA matching support  # Test non-Perl-compatible Unicode property support
484    
485  if [ $do7 = yes ] ; then  if [ $do13 = yes ] ; then
486    echo "Test 7: DFA matching"    echo "Test 13: API, internals, and non-Perl stuff for Unicode property support"
487    $valgrind ./pcretest -q -dfa $testdata/testinput7 testtry    if [ $utf8 -eq 0 -o $ucp -eq 0 ] ; then
488    if [ $? = 0 ] ; then      echo "  Skipped because Unicode property support is not available"
489      $cf $testdata/testoutput7 testtry    else
490      if [ $? != 0 ] ; then exit 1; fi      for opt in "" "-s" $jitopt; do
491    else exit 1        $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    fi
   echo "OK"  
503  fi  fi
504    
505  if [ $do8 = yes ] ; then  # Test JIT-specific features when JIT is available
506    echo "Test 8: DFA matching with UTF-8"  
507    $valgrind ./pcretest -q -dfa $testdata/testinput8 testtry  if [ $do14 = yes ] ; then
508    if [ $? = 0 ] ; then    echo "Test 14: JIT-specific features (JIT available)"
509      $cf $testdata/testoutput8 testtry    if [ $jit -eq 0 ] ; then
510      if [ $? != 0 ] ; then exit 1; fi      echo "  Skipped because JIT is not available or not usable"
511    else exit 1    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    fi
   echo "OK"  
520  fi  fi
521    
522  if [ $do9 = yes ] ; then  # Test JIT-specific features when JIT is not available
523    echo "Test 9: DFA matching with Unicode properties"  
524    $valgrind ./pcretest -q -dfa $testdata/testinput9 testtry  if [ $do15 = yes ] ; then
525    if [ $? = 0 ] ; then    echo "Test 15: JIT-specific features (JIT not available)"
526      $cf $testdata/testoutput9 testtry    if [ $jit -ne 0 ] ; then
527      if [ $? != 0 ] ; then exit 1; fi      echo "  Skipped because JIT is available"
528    else exit 1    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.159  
changed lines
  Added in v.766

  ViewVC Help
Powered by ViewVC 1.1.5