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

Diff of /code/trunk/RunTest

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

revision 137 by ph10, Thu Mar 29 13:56:00 2007 UTC revision 159 by ph10, Wed May 2 10:27:18 2007 UTC
# Line 1  Line 1 
1  #! /bin/sh  #! /bin/sh
2    
 # This file is generated by configure from RunTest.in. Make any changes  
 # to that file.  
   
3  # Run PCRE tests  # Run PCRE tests
4    
5  cf="diff -u"  cf="diff -u"
# Line 135  if [ $do1 = yes ] ; then Line 132  if [ $do1 = yes ] ; then
132    echo "Test 1: main functionality (Perl compatible)"    echo "Test 1: main functionality (Perl compatible)"
133    $valgrind ./pcretest -q $testdata/testinput1 testtry    $valgrind ./pcretest -q $testdata/testinput1 testtry
134    if [ $? = 0 ] ; then    if [ $? = 0 ] ; then
135      $cf testtry $testdata/testoutput1      $cf $testdata/testoutput1 testtry
136      if [ $? != 0 ] ; then exit 1; fi      if [ $? != 0 ] ; then exit 1; fi
137    else exit 1    else exit 1
138    fi    fi
# Line 149  if [ $do2 = yes ] ; then Line 146  if [ $do2 = yes ] ; then
146      echo "Test 2: API and error handling (not Perl compatible)"      echo "Test 2: API and error handling (not Perl compatible)"
147      $valgrind ./pcretest -q $testdata/testinput2 testtry      $valgrind ./pcretest -q $testdata/testinput2 testtry
148      if [ $? = 0 ] ; then      if [ $? = 0 ] ; then
149        $cf testtry $testdata/testoutput2        $cf $testdata/testoutput2 testtry
150        if [ $? != 0 ] ; then exit 1; fi        if [ $? != 0 ] ; then exit 1; fi
151      else exit 1      else exit 1
152      fi      fi
# Line 160  if [ $do2 = yes ] ; then Line 157  if [ $do2 = yes ] ; then
157    fi    fi
158  fi  fi
159    
160  # Locale-specific tests, provided the "fr_FR" locale is available  # Locale-specific tests, provided that either the "fr_FR" or the "french"
161    # locale is available. The former is the Unix-like standard; the latter is
162    # for Windows.
163    
164  if [ $do3 = yes ] ; then  if [ $do3 = yes ] ; then
165    locale -a | grep '^fr_FR$' >/dev/null    locale -a | grep '^fr_FR$' >/dev/null
166    if [ $? -eq 0 ] ; then    if [ $? -eq 0 ] ; then
167      echo "Test 3: locale-specific features (using 'fr_FR' locale)"      locale=fr_FR
168      $valgrind ./pcretest -q $testdata/testinput3 testtry      infile=$testdata/testinput3
169        outfile=$testdata/testoutput3
170      else
171        locale -a | grep '^french$' >/dev/null
172        if [ $? -eq 0 ] ; then
173          locale=french
174          sed 's/fr_FR/french/' $testdata/testinput3 >test3input
175          sed 's/fr_FR/french/' $testdata/testoutput3 >test3output
176          infile=test3input
177          outfile=test3output
178        else
179          locale=
180        fi
181      fi
182    
183      if [ "$locale" != "" ] ; then
184        echo "Test 3: locale-specific features (using '$locale' locale)"
185        $valgrind ./pcretest -q $infile testtry
186      if [ $? = 0 ] ; then      if [ $? = 0 ] ; then
187        $cf testtry $testdata/testoutput3        $cf $outfile testtry
188        if [ $? != 0 ] ; then        if [ $? != 0 ] ; then
189          echo " "          echo " "
190          echo "Locale test did not run entirely successfully."          echo "Locale test did not run entirely successfully."
# Line 180  if [ $do3 = yes ] ; then Line 196  if [ $do3 = yes ] ; then
196      else exit 1      else exit 1
197      fi      fi
198    else    else
199      echo "Cannot test locale-specific features - 'fr_FR' locale not found,"      echo "Cannot test locale-specific features - neither the 'fr_FR' nor the"
200      echo "or the \"locale\" command is not available to check for it."      echo "'french' locale exists, or the \"locale\" command is not available"
201        echo "to check for them."
202      echo " "      echo " "
203    fi    fi
204  fi  fi
# Line 192  if [ $do4 = yes ] ; then Line 209  if [ $do4 = yes ] ; then
209    echo "Test 4: UTF-8 support (Perl compatible)"    echo "Test 4: UTF-8 support (Perl compatible)"
210    $valgrind ./pcretest -q $testdata/testinput4 testtry    $valgrind ./pcretest -q $testdata/testinput4 testtry
211    if [ $? = 0 ] ; then    if [ $? = 0 ] ; then
212      $cf testtry $testdata/testoutput4      $cf $testdata/testoutput4 testtry
213      if [ $? != 0 ] ; then exit 1; fi      if [ $? != 0 ] ; then exit 1; fi
214    else exit 1    else exit 1
215    fi    fi
# Line 204  if [ $do5 = yes ] ; then Line 221  if [ $do5 = yes ] ; then
221      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)"
222      $valgrind ./pcretest -q $testdata/testinput5 testtry      $valgrind ./pcretest -q $testdata/testinput5 testtry
223      if [ $? = 0 ] ; then      if [ $? = 0 ] ; then
224        $cf testtry $testdata/testoutput5        $cf $testdata/testoutput5 testtry
225        if [ $? != 0 ] ; then exit 1; fi        if [ $? != 0 ] ; then exit 1; fi
226      else exit 1      else exit 1
227      fi      fi
# Line 220  if [ $do6 = yes ] ; then Line 237  if [ $do6 = yes ] ; then
237      echo "Test 6: Unicode property support"      echo "Test 6: Unicode property support"
238      $valgrind ./pcretest -q $testdata/testinput6 testtry      $valgrind ./pcretest -q $testdata/testinput6 testtry
239      if [ $? = 0 ] ; then      if [ $? = 0 ] ; then
240        $cf testtry $testdata/testoutput6        $cf $testdata/testoutput6 testtry
241        if [ $? != 0 ] ; then exit 1; fi        if [ $? != 0 ] ; then exit 1; fi
242      else exit 1      else exit 1
243      fi      fi
# Line 237  if [ $do7 = yes ] ; then Line 254  if [ $do7 = yes ] ; then
254    echo "Test 7: DFA matching"    echo "Test 7: DFA matching"
255    $valgrind ./pcretest -q -dfa $testdata/testinput7 testtry    $valgrind ./pcretest -q -dfa $testdata/testinput7 testtry
256    if [ $? = 0 ] ; then    if [ $? = 0 ] ; then
257      $cf testtry $testdata/testoutput7      $cf $testdata/testoutput7 testtry
258      if [ $? != 0 ] ; then exit 1; fi      if [ $? != 0 ] ; then exit 1; fi
259    else exit 1    else exit 1
260    fi    fi
# Line 248  if [ $do8 = yes ] ; then Line 265  if [ $do8 = yes ] ; then
265    echo "Test 8: DFA matching with UTF-8"    echo "Test 8: DFA matching with UTF-8"
266    $valgrind ./pcretest -q -dfa $testdata/testinput8 testtry    $valgrind ./pcretest -q -dfa $testdata/testinput8 testtry
267    if [ $? = 0 ] ; then    if [ $? = 0 ] ; then
268      $cf testtry $testdata/testoutput8      $cf $testdata/testoutput8 testtry
269      if [ $? != 0 ] ; then exit 1; fi      if [ $? != 0 ] ; then exit 1; fi
270    else exit 1    else exit 1
271    fi    fi
# Line 259  if [ $do9 = yes ] ; then Line 276  if [ $do9 = yes ] ; then
276    echo "Test 9: DFA matching with Unicode properties"    echo "Test 9: DFA matching with Unicode properties"
277    $valgrind ./pcretest -q -dfa $testdata/testinput9 testtry    $valgrind ./pcretest -q -dfa $testdata/testinput9 testtry
278    if [ $? = 0 ] ; then    if [ $? = 0 ] ; then
279      $cf testtry $testdata/testoutput9      $cf $testdata/testoutput9 testtry
280      if [ $? != 0 ] ; then exit 1; fi      if [ $? != 0 ] ; then exit 1; fi
281    else exit 1    else exit 1
282    fi    fi

Legend:
Removed from v.137  
changed lines
  Added in v.159

  ViewVC Help
Powered by ViewVC 1.1.5