/[pcre]/code/branches/pcre16/RunTest
ViewVC logotype

Contents of /code/branches/pcre16/RunTest

Parent Directory Parent Directory | Revision Log Revision Log


Revision 814 - (show annotations)
Wed Dec 21 12:05:24 2011 UTC (8 years, 5 months ago) by ph10
File size: 21789 byte(s)
Reorganized the tests and made many more work in 16-bit mode.
1 #! /bin/sh
2
3 # Run the PCRE tests using the pcretest program. The appropriate tests are
4 # selected, depending on which build-time options were used.
5
6 # All tests are now run both with and without -s, to ensure that everything is
7 # tested with and without studying. However, there are some tests that produce
8 # 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 # tests are duplicated in the files, one with /S to force studying always, and
11 # one with /SS to force *not* studying always. The use of -s doesn't then make
12 # 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 # disabled with /SS.
15
16 # When JIT support is available, all the tests are also run with -s+ to test
17 # (again, almost) everything with studying and the JIT option. There are also
18 # two tests for JIT-specific features, one to be run when JIT support is
19 # available, and one when it is not.
20
21 # 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
26 # executables under a simulator, for example:
27 #
28 # RunTest 3 sim "qemu-arm -s 8388608"
29
30 valgrind=
31 sim=
32 arg8=
33 arg16=
34
35 # Select which tests to run; for those that are explicitly requested, check
36 # that the necessary optional facilities are available.
37
38 do1=no
39 do2=no
40 do3=no
41 do4=no
42 do5=no
43 do6=no
44 do7=no
45 do8=no
46 do9=no
47 do10=no
48 do11=no
49 do12=no
50 do13=no
51 do14=no
52 do15=no
53 do16=no
54 do17=no
55 do18=no
56 do19=no
57
58 while [ $# -gt 0 ] ; do
59 case $1 in
60 1) do1=yes;;
61 2) do2=yes;;
62 3) do3=yes;;
63 4) do4=yes;;
64 5) do5=yes;;
65 6) do6=yes;;
66 7) do7=yes;;
67 8) do8=yes;;
68 9) do9=yes;;
69 10) do10=yes;;
70 11) do11=yes;;
71 12) do12=yes;;
72 13) do13=yes;;
73 14) do14=yes;;
74 15) do15=yes;;
75 16) do16=yes;;
76 17) do17=yes;;
77 18) do18=yes;;
78 19) do19=yes;;
79 -8) arg8=yes;;
80 -16) arg16=yes;;
81 valgrind) valgrind="valgrind -q --smc-check=all";;
82 sim) shift; sim=$1;;
83 *) echo "Unknown test number $1"; exit 1;;
84 esac
85 shift
86 done
87
88 # Set up a suitable "diff" command for comparison. Some systems
89 # have a diff that lacks a -u option. Try to deal with this.
90
91 if diff -u /dev/null /dev/null; then cf="diff -u"; else cf="diff"; fi
92
93 # Find the test data
94
95 if [ -n "$srcdir" -a -d "$srcdir" ] ; then
96 testdata="$srcdir/testdata"
97 elif [ -d "./testdata" ] ; then
98 testdata=./testdata
99 elif [ -d "../testdata" ] ; then
100 testdata=../testdata
101 else
102 echo "Cannot find the testdata directory"
103 exit 1
104 fi
105
106 # Find which optional facilities are available. In some Windows environments
107 # the output of pcretest -C has CRLF at the end of each line, but the shell
108 # strips only linefeeds from the output of a `backquoted` command. Hence the
109 # alternative patterns.
110
111 case `$sim ./pcretest -C | $sim ./pcregrep 'Internal link size'` in
112 *2|*2[[:space:]]) link_size=2;;
113 *3|*3[[:space:]]) link_size=3;;
114 *4|*4[[:space:]]) link_size=4;;
115 *) echo "Failed to find internal link size"; exit 1;;
116 esac
117
118 # Both 8-bit and 16-bit character strings may be supported, but only one
119 # need be.
120
121 $sim ./pcretest -C | $sim ./pcregrep '8-bit and 16-bit support' >/dev/null
122 if [ $? -eq 0 ] ; then
123 test8=
124 test16=-16
125 if [ "$arg8" = yes -a "$arg16" != yes ] ; then
126 test16=skip
127 fi
128 if [ "$arg16" = yes -a "$arg8" != yes ] ; then
129 test8=skip
130 fi
131 else
132 $sim ./pcretest -C | $sim ./pcregrep '8-bit support' >/dev/null
133 if [ $? -eq 0 ] ; then
134 if [ "$arg16" = yes ] ; then
135 echo "Cannot run 16-bit library tests: 16-bit library not compiled"
136 exit 1
137 fi
138 test8=
139 test16=skip
140 else
141 if [ "$arg8" = yes ] ; then
142 echo "Cannot run 8-bit library tests: 8-bit library not compiled"
143 exit 1
144 fi
145 test8=skip
146 test16=-16
147 fi
148 fi
149
150 # UTF support always applies to both bit sizes if both are supported; we can't
151 # have UTF-8 support without UTF-16 support (for example).
152
153 $sim ./pcretest -C | $sim ./pcregrep 'No UTF-(.+?) support' >/dev/null
154 utf=$?
155
156 $sim ./pcretest -C | $sim ./pcregrep 'No Unicode properties support' >/dev/null
157 ucp=$?
158
159 jitopt=
160 $sim ./pcretest -C | $sim ./pcregrep 'No just-in-time compiler support' \
161 >/dev/null
162 jit=$?
163 if [ $jit -ne 0 ] ; then
164 jitopt=-s+
165 fi
166
167 if [ "$test8" = skip ] ; then
168 if [ $do14 = yes ] ; then
169 echo "Can't run test 14 because the 8-bit library is not built"
170 exit 1
171 fi
172 if [ $do15 = yes ] ; then
173 echo "Can't run test 15 because the 8-bit library is not built"
174 exit 1
175 fi
176 if [ $do16 = yes ] ; then
177 echo "Can't run test 16 because the 8-bit library is not built"
178 exit 1
179 fi
180 fi
181
182 if [ "$test17" = skip ] ; then
183 if [ $do17 = yes ] ; then
184 echo "Can't run test 17 because the 16-bit library is not built"
185 exit 1
186 fi
187 if [ $do18 = yes ] ; then
188 echo "Can't run test 18 because the 16-bit library is not built"
189 exit 1
190 fi
191 if [ $do19 = yes ] ; then
192 echo "Can't run test 19 because the 16-bit library is not built"
193 exit 1
194 fi
195 fi
196
197 if [ $utf -eq 0 ] ; then
198 if [ $do4 = yes ] ; then
199 echo "Can't run test 4 because UTF support is not configured"
200 exit 1
201 fi
202 if [ $do5 = yes ] ; then
203 echo "Can't run test 5 because UTF support is not configured"
204 exit 1
205 fi
206 if [ $do9 = yes ] ; then
207 echo "Can't run test 8 because UTF support is not configured"
208 exit 1
209 fi
210 if [ $do15 = yes ] ; then
211 echo "Can't run test 15 because UTF support is not configured"
212 exit 1
213 fi
214 if [ $do18 = yes ] ; then
215 echo "Can't run test 18 because UTF support is not configured"
216 fi
217 fi
218
219 if [ $ucp -eq 0 ] ; then
220 if [ $do6 = yes ] ; then
221 echo "Can't run test 6 because Unicode property support is not configured"
222 exit 1
223 fi
224 if [ $do7 = yes ] ; then
225 echo "Can't run test 7 because Unicode property support is not configured"
226 exit 1
227 fi
228 if [ $do10 = yes ] ; then
229 echo "Can't run test 10 because Unicode property support is not configured"
230 exit 1
231 fi
232 if [ $do16 = yes ] ; then
233 echo "Can't run test 16 because Unicode property support is not configured"
234 exit 1
235 fi
236 if [ $do19 = yes ] ; then
237 echo "Can't run test 19 because Unicode property support is not configured"
238 exit 1
239 fi
240 fi
241
242 if [ $link_size -ne 2 ] ; then
243 if [ $do11 = yes ] ; then
244 echo "Can't run test 11 because the link size ($link_size) is not 2"
245 exit 1
246 fi
247 fi
248
249 if [ $jit -eq 0 ] ; then
250 if [ $do12 = "yes" ] ; then
251 echo "Can't run test 12 because JIT support is not configured"
252 exit 1
253 fi
254 else
255 if [ $do13 = "yes" ] ; then
256 echo "Can't run test 13 because JIT support is configured"
257 exit 1
258 fi
259 fi
260
261 # If no specific tests were requested, select all. Those that are not
262 # relevant will be skipped.
263
264 if [ $do1 = no -a $do2 = no -a $do3 = no -a $do4 = no -a \
265 $do5 = no -a $do6 = no -a $do7 = no -a $do8 = no -a \
266 $do9 = no -a $do10 = no -a $do11 = no -a $do12 = no -a \
267 $do13 = no -a $do14 = no -a $do15 = no -a $do16 = no -a \
268 $do17 = no -a $do18 = no -a $do19 = no ] ; then
269 do1=yes
270 do2=yes
271 do3=yes
272 do4=yes
273 do5=yes
274 do6=yes
275 do7=yes
276 do8=yes
277 do9=yes
278 do10=yes
279 do11=yes
280 do12=yes
281 do13=yes
282 do14=yes
283 do15=yes
284 do16=yes
285 do17=yes
286 do18=yes
287 do19=yes
288 fi
289
290 # Show which release and which test data
291
292 echo ""
293 echo PCRE C library tests using test data from $testdata
294 $sim ./pcretest /dev/null
295
296 for bmode in "$test8" "$test16"; do
297 case "$bmode" in
298 skip) continue;;
299 -16) if [ "$test8" != "skip" ] ; then echo ""; fi
300 bits=16; echo "---- Testing 16-bit library ----"; echo "";;
301 *) bits=8; echo "---- Testing 8-bit library ----"; echo "";;
302 esac
303
304 # Primary test, compatible with JIT and all versions of Perl >= 5.8
305
306 if [ $do1 = yes ] ; then
307 echo "Test 1: main functionality (Compatible with Perl >= 5.10)"
308 for opt in "" "-s" $jitopt; do
309 $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput1 testtry
310 if [ $? = 0 ] ; then
311 $cf $testdata/testoutput1 testtry
312 if [ $? != 0 ] ; then exit 1; fi
313 else exit 1
314 fi
315 if [ "$opt" = "-s" ] ; then echo " OK with study"
316 elif [ "$opt" = "-s+" ] ; then echo " OK with JIT study"
317 else echo " OK"
318 fi
319 done
320 fi
321
322 # PCRE tests that are not JIT or Perl-compatible: API, errors, internals
323
324 if [ $do2 = yes ] ; then
325 echo "Test 2: API, errors, internals, and non-Perl stuff (not UTF-$bits)"
326 for opt in "" "-s" $jitopt; do
327 $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput2 testtry
328 if [ $? = 0 ] ; then
329 $cf $testdata/testoutput2 testtry
330 if [ $? != 0 ] ; then exit 1; fi
331 else
332 echo " "
333 echo "** Test 2 requires a lot of stack. If it has crashed with a"
334 echo "** segmentation fault, it may be that you do not have enough"
335 echo "** stack available by default. Please see the 'pcrestack' man"
336 echo "** page for a discussion of PCRE's stack usage."
337 echo " "
338 exit 1
339 fi
340 if [ "$opt" = "-s" ] ; then echo " OK with study"
341 elif [ "$opt" = "-s+" ] ; then echo " OK with JIT study"
342 else echo " OK"
343 fi
344 done
345 fi
346
347 # Locale-specific tests, provided that either the "fr_FR" or the "french"
348 # locale is available. The former is the Unix-like standard; the latter is
349 # for Windows. Another possibility is "fr", which needs to be run against
350 # the Windows-specific input and output files.
351
352 if [ $do3 = yes ] ; then
353 locale -a | grep '^fr_FR$' >/dev/null
354 if [ $? -eq 0 ] ; then
355 locale=fr_FR
356 infile=$testdata/testinput3
357 outfile=$testdata/testoutput3
358 else
359 infile=test3input
360 outfile=test3output
361 locale -a | grep '^french$' >/dev/null
362 if [ $? -eq 0 ] ; then
363 locale=french
364 sed 's/fr_FR/french/' $testdata/testinput3 >test3input
365 sed 's/fr_FR/french/' $testdata/testoutput3 >test3output
366 else
367 locale -a | grep '^fr$' >/dev/null
368 if [ $? -eq 0 ] ; then
369 locale=fr
370 sed 's/fr_FR/fr/' $testdata/wintestinput3 >test3input
371 sed 's/fr_FR/fr/' $testdata/wintestoutput3 >test3output
372 else
373 locale=
374 fi
375 fi
376 fi
377
378 if [ "$locale" != "" ] ; then
379 echo "Test 3: locale-specific features (using '$locale' locale)"
380 for opt in "" "-s" $jitopt; do
381 $sim $valgrind ./pcretest -q $bmode $opt $infile testtry
382 if [ $? = 0 ] ; then
383 $cf $outfile testtry
384 if [ $? != 0 ] ; then
385 echo " "
386 echo "Locale test did not run entirely successfully."
387 echo "This usually means that there is a problem with the locale"
388 echo "settings rather than a bug in PCRE."
389 break;
390 else
391 if [ "$opt" = "-s" ] ; then echo " OK with study"
392 elif [ "$opt" = "-s+" ] ; then echo " OK with JIT study"
393 else echo " OK"
394 fi
395 fi
396 else exit 1
397 fi
398 done
399 else
400 echo "Cannot test locale-specific features - none of the 'fr_FR', 'fr' or"
401 echo "'french' locales exist, or the \"locale\" command is not available"
402 echo "to check for them."
403 echo " "
404 fi
405 fi
406
407 # Additional tests for UTF support
408
409 if [ $do4 = yes ] ; then
410 echo "Test 4: UTF-$bits support (Compatible with Perl >= 5.10)"
411 if [ $utf -eq 0 ] ; then
412 echo " Skipped because UTF-$bits support is not available"
413 else
414 for opt in "" "-s" $jitopt; do
415 $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput4 testtry
416 if [ $? = 0 ] ; then
417 $cf $testdata/testoutput4 testtry
418 if [ $? != 0 ] ; then exit 1; fi
419 else exit 1
420 fi
421 if [ "$opt" = "-s" ] ; then echo " OK with study"
422 elif [ "$opt" = "-s+" ] ; then echo " OK with JIT study"
423 else echo " OK"
424 fi
425 done
426 fi
427 fi
428
429 if [ $do5 = yes ] ; then
430 echo "Test 5: API, internals, and non-Perl stuff for UTF-$bits support"
431 if [ $utf -eq 0 ] ; then
432 echo " Skipped because UTF-$bits support is not available"
433 else
434 for opt in "" "-s" $jitopt; do
435 $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput5 testtry
436 if [ $? = 0 ] ; then
437 $cf $testdata/testoutput5 testtry
438 if [ $? != 0 ] ; then exit 1; fi
439 else exit 1
440 fi
441 if [ "$opt" = "-s" ] ; then echo " OK with study"
442 elif [ "$opt" = "-s+" ] ; then echo " OK with JIT study"
443 else echo " OK"
444 fi
445 done
446 fi
447 fi
448
449 if [ $do6 = yes ] ; then
450 echo "Test 6: Unicode property support (Compatible with Perl >= 5.10)"
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/testinput6 testtry
456 if [ $? = 0 ] ; then
457 $cf $testdata/testoutput6 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 # Test non-Perl-compatible Unicode property support
470
471 if [ $do7 = yes ] ; then
472 echo "Test 7: API, internals, and non-Perl stuff for Unicode property support"
473 if [ $utf -eq 0 -o $ucp -eq 0 ] ; then
474 echo " Skipped because Unicode property support is not available"
475 else
476 for opt in "" "-s" $jitopt; do
477 $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput7 testtry
478 if [ $? = 0 ] ; then
479 $cf $testdata/testoutput7 testtry
480 if [ $? != 0 ] ; then exit 1; fi
481 else exit 1
482 fi
483 if [ "$opt" = "-s" ] ; then echo " OK with study"
484 elif [ "$opt" = "-s+" ] ; then echo " OK with JIT study"
485 else echo " OK"
486 fi
487 done
488 fi
489 fi
490
491 # Tests for DFA matching support
492
493 if [ $do8 = yes ] ; then
494 echo "Test 8: DFA matching main functionality"
495 for opt in "" "-s"; do
496 $sim $valgrind ./pcretest -q $bmode $opt -dfa $testdata/testinput8 testtry
497 if [ $? = 0 ] ; then
498 $cf $testdata/testoutput8 testtry
499 if [ $? != 0 ] ; then exit 1; fi
500 else exit 1
501 fi
502 if [ "$opt" = "-s" ] ; then echo " OK with study" ; else echo " OK"; fi
503 done
504 fi
505
506 if [ $do9 = yes ] ; then
507 echo "Test 9: DFA matching with UTF-$bits"
508 if [ $utf -eq 0 ] ; then
509 echo " Skipped because UTF-$bits support is not available"
510 else
511 for opt in "" "-s"; do
512 $sim $valgrind ./pcretest -q $bmode $opt -dfa $testdata/testinput9 testtry
513 if [ $? = 0 ] ; then
514 $cf $testdata/testoutput9 testtry
515 if [ $? != 0 ] ; then exit 1; fi
516 else exit 1
517 fi
518 if [ "$opt" = "-s" ] ; then echo " OK with study" ; else echo " OK"; fi
519 done
520 fi
521 fi
522
523 if [ $do10 = yes ] ; then
524 echo "Test 10: DFA matching with Unicode properties"
525 if [ $utf -eq 0 -o $ucp -eq 0 ] ; then
526 echo " Skipped because Unicode property support is not available"
527 else
528 for opt in "" "-s"; do
529 $sim $valgrind ./pcretest -q $bmode $opt -dfa $testdata/testinput10 testtry
530 if [ $? = 0 ] ; then
531 $cf $testdata/testoutput10 testtry
532 if [ $? != 0 ] ; then exit 1; fi
533 else exit 1
534 fi
535 if [ "$opt" = "-s" ] ; then echo " OK with study" ; else echo " OK"; fi
536 done
537 fi
538 fi
539
540 # Test of internal offsets and code sizes. This test is run only when there
541 # is Unicode property support and the link size is 2. The actual tests are
542 # mostly the same as in some of the above, but in this test we inspect some
543 # offsets and sizes that require a known link size. This is a doublecheck for
544 # the maintainer, just in case something changes unexpectely. The output from
545 # this test is not the same in 8-bit and 16-bit modes.
546
547 if [ $do11 = yes ] ; then
548 echo "Test 11: Internal offsets and code size tests"
549 if [ $link_size -ne 2 ] ; then
550 echo " Skipped because link size is not 2"
551 elif [ $ucp -eq 0 ] ; then
552 echo " Skipped because Unicode property support is not available"
553 else
554 for opt in "" "-s"; do
555 $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput11 testtry
556 if [ $? = 0 ] ; then
557 $cf $testdata/testoutput11-$bits testtry
558 if [ $? != 0 ] ; then exit 1; fi
559 else exit 1
560 fi
561 if [ "$opt" = "-s" ] ; then echo " OK with study" ; else echo " OK"; fi
562 done
563 fi
564 fi
565
566 # Test JIT-specific features when JIT is available
567
568 if [ $do12 = yes ] ; then
569 echo "Test 12: JIT-specific features (JIT available)"
570 if [ $jit -eq 0 ] ; then
571 echo " Skipped because JIT is not available or not usable"
572 else
573 $sim $valgrind ./pcretest -q $bmode $testdata/testinput12 testtry
574 if [ $? = 0 ] ; then
575 $cf $testdata/testoutput12 testtry
576 if [ $? != 0 ] ; then exit 1; fi
577 else exit 1
578 fi
579 echo " OK"
580 fi
581 fi
582
583 # Test JIT-specific features when JIT is not available
584
585 if [ $do13 = yes ] ; then
586 echo "Test 13: JIT-specific features (JIT not available)"
587 if [ $jit -ne 0 ] ; then
588 echo " Skipped because JIT is available"
589 else
590 $sim $valgrind ./pcretest -q $bmode $testdata/testinput13 testtry
591 if [ $? = 0 ] ; then
592 $cf $testdata/testoutput13 testtry
593 if [ $? != 0 ] ; then exit 1; fi
594 else exit 1
595 fi
596 echo " OK"
597 fi
598 fi
599
600 # Tests for 8-bit-specific features
601
602 if [ "$do14" = yes ] ; then
603 echo "Test 14: specials for the basic 8-bit library"
604 if [ "$bits" = "16" ] ; then
605 echo " Skipped when running 16-bit tests"
606 elif [ $utf -eq 0 ] ; then
607 echo " Skipped because UTF-$bits support is not available"
608 else
609 for opt in "" "-s" $jitopt; do
610 $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput14 testtry
611 if [ $? = 0 ] ; then
612 $cf $testdata/testoutput14 testtry
613 if [ $? != 0 ] ; then exit 1; fi
614 else exit 1
615 fi
616 if [ "$opt" = "-s" ] ; then echo " OK with study"
617 elif [ "$opt" = "-s+" ] ; then echo " OK with JIT study"
618 else echo " OK"
619 fi
620 done
621 fi
622 fi
623
624 # Tests for 8-bit-specific features (needs UTF-8 support)
625
626 if [ "$do15" = yes ] ; then
627 echo "Test 15: specials for the 8-bit library with UTF-8 support"
628 if [ "$bits" = "16" ] ; then
629 echo " Skipped when running 16-bit tests"
630 elif [ $utf -eq 0 ] ; then
631 echo " Skipped because UTF-$bits support is not available"
632 else
633 for opt in "" "-s" $jitopt; do
634 $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput15 testtry
635 if [ $? = 0 ] ; then
636 $cf $testdata/testoutput15 testtry
637 if [ $? != 0 ] ; then exit 1; fi
638 else exit 1
639 fi
640 if [ "$opt" = "-s" ] ; then echo " OK with study"
641 elif [ "$opt" = "-s+" ] ; then echo " OK with JIT study"
642 else echo " OK"
643 fi
644 done
645 fi
646 fi
647
648 # Tests for 8-bit-specific features (Unicode property support)
649
650 if [ $do16 = yes ] ; then
651 echo "Test 16: specials for the 8-bit library with Unicode propery support"
652 if [ "$bits" = "16" ] ; then
653 echo " Skipped when running 16-bit tests"
654 elif [ $ucp -eq 0 ] ; then
655 echo " Skipped because Unicode property support is not available"
656 else
657 for opt in "" "-s" $jitopt; do
658 $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput16 testtry
659 if [ $? = 0 ] ; then
660 $cf $testdata/testoutput16 testtry
661 if [ $? != 0 ] ; then exit 1; fi
662 else exit 1
663 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
670 fi
671
672 # Tests for 16-bit-specific features
673
674 if [ $do17 = yes ] ; then
675 echo "Test 17: specials for the basic 16-bit library"
676 if [ "$bits" = "8" ] ; then
677 echo " Skipped when running 8-bit tests"
678 else
679 for opt in "" "-s" $jitopt; do
680 $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput17 testtry
681 if [ $? = 0 ] ; then
682 $cf $testdata/testoutput17 testtry
683 if [ $? != 0 ] ; then exit 1; fi
684 else exit 1
685 fi
686 if [ "$opt" = "-s" ] ; then echo " OK with study"
687 elif [ "$opt" = "-s+" ] ; then echo " OK with JIT study"
688 else echo " OK"
689 fi
690 done
691 fi
692 fi
693
694 # Tests for 16-bit-specific features (UTF-16 support)
695
696 if [ $do18 = yes ] ; then
697 echo "Test 18: specials for the 16-bit library with UTF-16 support"
698 if [ "$bits" = "8" ] ; then
699 echo " Skipped when running 8-bit tests"
700 elif [ $utf -eq 0 ] ; then
701 echo " Skipped because UTF-$bits support is not available"
702 else
703 for opt in "" "-s" $jitopt; do
704 $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput18 testtry
705 if [ $? = 0 ] ; then
706 $cf $testdata/testoutput18 testtry
707 if [ $? != 0 ] ; then exit 1; fi
708 else exit 1
709 fi
710 if [ "$opt" = "-s" ] ; then echo " OK with study"
711 elif [ "$opt" = "-s+" ] ; then echo " OK with JIT study"
712 else echo " OK"
713 fi
714 done
715 fi
716 fi
717
718 # Tests for 16-bit-specific features (Unicode property support)
719
720 if [ $do19 = yes ] ; then
721 echo "Test 19: specials for the 16-bit library with Unicode propery support"
722 if [ "$bits" = "8" ] ; then
723 echo " Skipped when running 8-bit tests"
724 elif [ $ucp -eq 0 ] ; then
725 echo " Skipped because Unicode property support is not available"
726 else
727 for opt in "" "-s" $jitopt; do
728 $sim $valgrind ./pcretest -q $bmode $opt $testdata/testinput19 testtry
729 if [ $? = 0 ] ; then
730 $cf $testdata/testoutput19 testtry
731 if [ $? != 0 ] ; then exit 1; fi
732 else exit 1
733 fi
734 if [ "$opt" = "-s" ] ; then echo " OK with study"
735 elif [ "$opt" = "-s+" ] ; then echo " OK with JIT study"
736 else echo " OK"
737 fi
738 done
739 fi
740 fi
741
742 # End of loop for 8-bit/16-bit tests
743 done
744
745 # End

Properties

Name Value
svn:executable *
svn:keywords "Author Date Id Revision Url"

  ViewVC Help
Powered by ViewVC 1.1.5