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

Contents of /code/trunk/RunTest

Parent Directory Parent Directory | Revision Log Revision Log


Revision 842 - (show annotations) (download)
Sat Dec 31 15:19:04 2011 UTC (2 years, 8 months ago) by ph10
File size: 21794 byte(s)
Typos in PrepareRelease; include 16-bit in make distcheck; fix RunTest and 
RunGrepTest when building in non-source directory; problem in pcretest when no 
UTF or 16-bit support; other tidies consequent on building a tarball.

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

Properties

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

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12