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

Diff of /code/trunk/RunTest

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

revision 157 by ph10, Tue May 1 09:19:56 2007 UTC revision 162 by ph10, Thu May 3 10:47:48 2007 UTC
# Line 55  while [ $# -gt 0 ] ; do Line 55  while [ $# -gt 0 ] ; do
55    shift    shift
56  done  done
57    
 if [ "$link_size" != "2" ] ; then  
   if [ $do2 = yes ] ; then  
     echo "Can't run test 2 with an internal link size other than 2"  
     exit 1  
   fi  
   if [ $do5 = yes ] ; then  
     echo "Can't run test 5 with an internal link size other than 2"  
     exit 1  
   fi  
   if [ $do6 = yes ] ; then  
     echo "Can't run test 6 with an internal link size other than 2"  
     exit 1  
   fi  
 fi  
   
58  if [ $utf8 -eq 0 ] ; then  if [ $utf8 -eq 0 ] ; then
59    if [ $do4 = yes ] ; then    if [ $do4 = yes ] ; then
60      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 132  if [ $do1 = yes ] ; then Line 117  if [ $do1 = yes ] ; then
117    echo "Test 1: main functionality (Perl compatible)"    echo "Test 1: main functionality (Perl compatible)"
118    $valgrind ./pcretest -q $testdata/testinput1 testtry    $valgrind ./pcretest -q $testdata/testinput1 testtry
119    if [ $? = 0 ] ; then    if [ $? = 0 ] ; then
120      $cf testtry $testdata/testoutput1      $cf $testdata/testoutput1 testtry
121      if [ $? != 0 ] ; then exit 1; fi      if [ $? != 0 ] ; then exit 1; fi
122    else exit 1    else exit 1
123    fi    fi
# Line 142  fi Line 127  fi
127  # PCRE tests that are not Perl-compatible - API & error tests, mostly  # PCRE tests that are not Perl-compatible - API & error tests, mostly
128    
129  if [ $do2 = yes ] ; then  if [ $do2 = yes ] ; then
130    if [ "$link_size" = "2" ] ; then    echo "Test 2: API and error handling (not Perl compatible)"
131      echo "Test 2: API and error handling (not Perl compatible)"    $valgrind ./pcretest -q $testdata/testinput2 testtry
132      $valgrind ./pcretest -q $testdata/testinput2 testtry    if [ $? = 0 ] ; then
133      if [ $? = 0 ] ; then      $cf $testdata/testoutput2 testtry
134        $cf testtry $testdata/testoutput2      if [ $? != 0 ] ; then exit 1; fi
135        if [ $? != 0 ] ; then exit 1; fi    else exit 1
     else exit 1  
     fi  
     echo "OK"  
   else  
     echo Test 2 skipped for link size other than 2 \($link_size\)  
     echo " "  
136    fi    fi
137      echo "OK"
138  fi  fi
139    
140  # Locale-specific tests, provided that either the "fr_FR" or the "french"  # Locale-specific tests, provided that either the "fr_FR" or the "french"
# Line 174  if [ $do3 = yes ] ; then Line 154  if [ $do3 = yes ] ; then
154        sed 's/fr_FR/french/' $testdata/testinput3 >test3input        sed 's/fr_FR/french/' $testdata/testinput3 >test3input
155        sed 's/fr_FR/french/' $testdata/testoutput3 >test3output        sed 's/fr_FR/french/' $testdata/testoutput3 >test3output
156        infile=test3input        infile=test3input
157        outfile=test3output        outfile=test3output
158      else      else
159        locale=        locale=
160      fi      fi
161    fi    fi
162    
163    if [ "$locale" != "" ] ; then    if [ "$locale" != "" ] ; then
164      echo "Test 3: locale-specific features (using '$locale' locale)"      echo "Test 3: locale-specific features (using '$locale' locale)"
165      $valgrind ./pcretest -q $infile testtry      $valgrind ./pcretest -q $infile testtry
166      if [ $? = 0 ] ; then      if [ $? = 0 ] ; then
167        $cf testtry $outfile        $cf $outfile testtry
168        if [ $? != 0 ] ; then        if [ $? != 0 ] ; then
169          echo " "          echo " "
170          echo "Locale test did not run entirely successfully."          echo "Locale test did not run entirely successfully."
# Line 209  if [ $do4 = yes ] ; then Line 189  if [ $do4 = yes ] ; then
189    echo "Test 4: UTF-8 support (Perl compatible)"    echo "Test 4: UTF-8 support (Perl compatible)"
190    $valgrind ./pcretest -q $testdata/testinput4 testtry    $valgrind ./pcretest -q $testdata/testinput4 testtry
191    if [ $? = 0 ] ; then    if [ $? = 0 ] ; then
192      $cf testtry $testdata/testoutput4      $cf $testdata/testoutput4 testtry
193      if [ $? != 0 ] ; then exit 1; fi      if [ $? != 0 ] ; then exit 1; fi
194    else exit 1    else exit 1
195    fi    fi
# Line 217  if [ $do4 = yes ] ; then Line 197  if [ $do4 = yes ] ; then
197  fi  fi
198    
199  if [ $do5 = yes ] ; then  if [ $do5 = yes ] ; then
200    if [ "$link_size" = "2" ] ; then    echo "Test 5: API and internals for UTF-8 support (not Perl compatible)"
201      echo "Test 5: API and internals for UTF-8 support (not Perl compatible)"    $valgrind ./pcretest -q $testdata/testinput5 testtry
202      $valgrind ./pcretest -q $testdata/testinput5 testtry    if [ $? = 0 ] ; then
203      if [ $? = 0 ] ; then      $cf $testdata/testoutput5 testtry
204        $cf testtry $testdata/testoutput5      if [ $? != 0 ] ; then exit 1; fi
205        if [ $? != 0 ] ; then exit 1; fi    else exit 1
     else exit 1  
     fi  
     echo "OK"  
   else  
     echo Test 5 skipped for link size other than 2 \($link_size\)  
     echo " "  
206    fi    fi
207      echo "OK"
208  fi  fi
209    
210  if [ $do6 = yes ] ; then  if [ $do6 = yes ] ; then
211    if [ "$link_size" = "2" ] ; then    echo "Test 6: Unicode property support"
212      echo "Test 6: Unicode property support"    $valgrind ./pcretest -q $testdata/testinput6 testtry
213      $valgrind ./pcretest -q $testdata/testinput6 testtry    if [ $? = 0 ] ; then
214      if [ $? = 0 ] ; then      $cf $testdata/testoutput6 testtry
215        $cf testtry $testdata/testoutput6      if [ $? != 0 ] ; then exit 1; fi
216        if [ $? != 0 ] ; then exit 1; fi    else exit 1
     else exit 1  
     fi  
     echo "OK"  
   else  
     echo Test 6 skipped for link size other than 2 \($link_size\)  
     echo " "  
217    fi    fi
218      echo "OK"
219  fi  fi
220    
221  # Tests for DFA matching support  # Tests for DFA matching support
# Line 254  if [ $do7 = yes ] ; then Line 224  if [ $do7 = yes ] ; then
224    echo "Test 7: DFA matching"    echo "Test 7: DFA matching"
225    $valgrind ./pcretest -q -dfa $testdata/testinput7 testtry    $valgrind ./pcretest -q -dfa $testdata/testinput7 testtry
226    if [ $? = 0 ] ; then    if [ $? = 0 ] ; then
227      $cf testtry $testdata/testoutput7      $cf $testdata/testoutput7 testtry
228      if [ $? != 0 ] ; then exit 1; fi      if [ $? != 0 ] ; then exit 1; fi
229    else exit 1    else exit 1
230    fi    fi
# Line 265  if [ $do8 = yes ] ; then Line 235  if [ $do8 = yes ] ; then
235    echo "Test 8: DFA matching with UTF-8"    echo "Test 8: DFA matching with UTF-8"
236    $valgrind ./pcretest -q -dfa $testdata/testinput8 testtry    $valgrind ./pcretest -q -dfa $testdata/testinput8 testtry
237    if [ $? = 0 ] ; then    if [ $? = 0 ] ; then
238      $cf testtry $testdata/testoutput8      $cf $testdata/testoutput8 testtry
239      if [ $? != 0 ] ; then exit 1; fi      if [ $? != 0 ] ; then exit 1; fi
240    else exit 1    else exit 1
241    fi    fi
# Line 276  if [ $do9 = yes ] ; then Line 246  if [ $do9 = yes ] ; then
246    echo "Test 9: DFA matching with Unicode properties"    echo "Test 9: DFA matching with Unicode properties"
247    $valgrind ./pcretest -q -dfa $testdata/testinput9 testtry    $valgrind ./pcretest -q -dfa $testdata/testinput9 testtry
248    if [ $? = 0 ] ; then    if [ $? = 0 ] ; then
249      $cf testtry $testdata/testoutput9      $cf $testdata/testoutput9 testtry
250      if [ $? != 0 ] ; then exit 1; fi      if [ $? != 0 ] ; then exit 1; fi
251    else exit 1    else exit 1
252    fi    fi

Legend:
Removed from v.157  
changed lines
  Added in v.162

  ViewVC Help
Powered by ViewVC 1.1.5