/[pcre]/code/tags/pcre-8.20/RunTest
ViewVC logotype

Diff of /code/tags/pcre-8.20/RunTest

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

revision 115 by ph10, Mon Mar 5 12:36:47 2007 UTC revision 116 by ph10, Fri Mar 9 15:23:02 2007 UTC
# Line 3  Line 3 
3  # This file is generated by configure from RunTest.in. Make any changes  # This file is generated by configure from RunTest.in. Make any changes
4  # to that file.  # to that file.
5    
 # TODO: Replace use of variables @LINK_SIZE@, @UTF8@ and @UCP@ with  
 #       the data found from the output of 'pcretest -C' instead.  
   
6  # Run PCRE tests  # Run PCRE tests
7    
8  cf=diff  cf=diff
# Line 15  if [ ! -d testdata ] ; then Line 12  if [ ! -d testdata ] ; then
12  fi  fi
13  testdata=./testdata  testdata=./testdata
14    
15    # Find which optional facilities are available
16    
17    case `./pcretest -C | ./pcregrep 'Internal link size'` in
18      *2) link_size=2;;
19      *3) link_size=3;;
20      *4) link_size=4;;
21       *) echo "Failed to find internal link size"; exit 1;;
22    esac
23    
24    ./pcretest -C | ./pcregrep 'No UTF-8 support' >/dev/null
25    utf8=$?
26    
27  # Select which tests to run; if no selection, run all  ./pcretest -C | ./pcregrep 'No Unicode properties support' >/dev/null
28    ucp=$?
29    
30    # Select which tests to run; for those that are explicitly requested, check
31    # that the necessary optional facilities are available.
32    
33  do1=no  do1=no
34  do2=no  do2=no
# Line 45  while [ $# -gt 0 ] ; do Line 57  while [ $# -gt 0 ] ; do
57    shift    shift
58  done  done
59    
60  if [ "@LINK_SIZE@" != "2" ] ; then  if [ "$link_size" != "2" ] ; then
61    if [ $do2 = yes ] ; then    if [ $do2 = yes ] ; then
62      echo "Can't run test 2 with an internal link size other than 2"      echo "Can't run test 2 with an internal link size other than 2"
63      exit 1      exit 1
# Line 60  if [ "@LINK_SIZE@" != "2" ] ; then Line 72  if [ "@LINK_SIZE@" != "2" ] ; then
72    fi    fi
73  fi  fi
74    
75  if [ "@UTF8@" = "no" ] ; then  if [ $utf8 -eq 0 ] ; then
76    if [ $do4 = yes ] ; then    if [ $do4 = yes ] ; then
77      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"
78      exit 1      exit 1
# Line 83  if [ "@UTF8@" = "no" ] ; then Line 95  if [ "@UTF8@" = "no" ] ; then
95    fi    fi
96  fi  fi
97    
98  if [ "@UCP@" = "no" ] ; then  if [ $ucp -eq 0 ] ; then
99    if [ $do6 = yes ] ; then    if [ $do6 = yes ] ; then
100      echo "Can't run test 6 because Unicode property support is not configured"      echo "Can't run test 6 because Unicode property support is not configured"
101      exit 1      exit 1
# Line 94  if [ "@UCP@" = "no" ] ; then Line 106  if [ "@UCP@" = "no" ] ; then
106    fi    fi
107  fi  fi
108    
109    # If no specific tests were requested, select all that are relevant.
110    
111  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 \
112       $do5 = no -a $do6 = no -a $do7 = no -a $do8 = no -a \       $do5 = no -a $do6 = no -a $do7 = no -a $do8 = no -a \
113       $do9 = no ] ; then       $do9 = no ] ; then
114    do1=yes    do1=yes
115    do2=yes    do2=yes
116    do3=yes    do3=yes
117    if [ "@UTF8@" != "no" ] ; then do4=yes; fi    if [ $utf8 -ne 0 ] ; then do4=yes; fi
118    if [ "@UTF8@" != "no" ] ; then do5=yes; fi    if [ $utf8 -ne 0 ] ; then do5=yes; fi
119    if [ "@UTF8@" != "no" -a "@UCP@" != "no" ] ; then do6=yes; fi    if [ $utf8 -ne 0 -a $ucp -ne 0 ] ; then do6=yes; fi
120    do7=yes    do7=yes
121    if [ "@UTF8@" != "no" ] ; then do8=yes; fi    if [ $utf8 -ne 0 ] ; then do8=yes; fi
122    if [ "@UTF8@" != "no" -a "@UCP@" != "no" ] ; then do9=yes; fi    if [ $utf8 -ne 0 -a $ucp -ne 0 ] ; then do9=yes; fi
123  fi  fi
124    
125  # Show which release  # Show which release
# Line 129  fi Line 143  fi
143  # PCRE tests that are not Perl-compatible - API & error tests, mostly  # PCRE tests that are not Perl-compatible - API & error tests, mostly
144    
145  if [ $do2 = yes ] ; then  if [ $do2 = yes ] ; then
146    if [ "@LINK_SIZE@" = "2" ] ; then    if [ "$link_size" = "2" ] ; then
147      echo "Test 2: API and error handling (not Perl compatible)"      echo "Test 2: API and error handling (not Perl compatible)"
148      $valgrind ./pcretest -q $testdata/testinput2 testtry      $valgrind ./pcretest -q $testdata/testinput2 testtry
149      if [ $? = 0 ] ; then      if [ $? = 0 ] ; then
# Line 140  if [ $do2 = yes ] ; then Line 154  if [ $do2 = yes ] ; then
154      echo "OK"      echo "OK"
155      echo " "      echo " "
156    else    else
157      echo Test 2 skipped for link size other than 2 \(@LINK_SIZE@\)      echo Test 2 skipped for link size other than 2 \($link_size\)
158      echo " "      echo " "
159    fi    fi
160  fi  fi
# Line 187  if [ $do4 = yes ] ; then Line 201  if [ $do4 = yes ] ; then
201  fi  fi
202    
203  if [ $do5 = yes ] ; then  if [ $do5 = yes ] ; then
204    if [ "@LINK_SIZE@" = "2" ] ; then    if [ "$link_size" = "2" ] ; then
205      echo "Test 5: API and internals for UTF-8 support (not Perl compatible)"      echo "Test 5: API and internals for UTF-8 support (not Perl compatible)"
206      $valgrind ./pcretest -q $testdata/testinput5 testtry      $valgrind ./pcretest -q $testdata/testinput5 testtry
207      if [ $? = 0 ] ; then      if [ $? = 0 ] ; then
# Line 198  if [ $do5 = yes ] ; then Line 212  if [ $do5 = yes ] ; then
212      echo "OK"      echo "OK"
213      echo " "      echo " "
214    else    else
215      echo Test 5 skipped for link size other than 2 \(@LINK_SIZE@\)      echo Test 5 skipped for link size other than 2 \($link_size\)
216      echo " "      echo " "
217    fi    fi
218  fi  fi
219    
220  if [ $do6 = yes ] ; then  if [ $do6 = yes ] ; then
221    if [ "@LINK_SIZE@" = "2" ] ; then    if [ "$link_size" = "2" ] ; then
222      echo "Test 6: Unicode property support"      echo "Test 6: Unicode property support"
223      $valgrind ./pcretest -q $testdata/testinput6 testtry      $valgrind ./pcretest -q $testdata/testinput6 testtry
224      if [ $? = 0 ] ; then      if [ $? = 0 ] ; then
# Line 215  if [ $do6 = yes ] ; then Line 229  if [ $do6 = yes ] ; then
229      echo "OK"      echo "OK"
230      echo " "      echo " "
231    else    else
232      echo Test 6 skipped for link size other than 2 \(@LINK_SIZE@\)      echo Test 6 skipped for link size other than 2 \($link_size\)
233      echo " "      echo " "
234    fi    fi
235  fi  fi

Legend:
Removed from v.115  
changed lines
  Added in v.116

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12