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

Diff of /code/trunk/RunTest

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

revision 86 by nigel, Sat Feb 24 21:40:59 2007 UTC revision 87 by nigel, Sat Feb 24 21:41:21 2007 UTC
# Line 6  Line 6 
6  # Run PCRE tests  # Run PCRE tests
7    
8  cf=diff  cf=diff
9    valgrind=
10  if [ ! -d testdata ] ; then  if [ ! -d testdata ] ; then
11    ln -s @top_srcdir@/testdata testdata    ln -s @top_srcdir@/testdata testdata
12  fi  fi
13  testdata=./testdata  testdata=./testdata
14    
15    
16  # Select which tests to run; if no selection, run all  # Select which tests to run; if no selection, run all
17    
18  do1=no  do1=no
# Line 34  while [ $# -gt 0 ] ; do Line 36  while [ $# -gt 0 ] ; do
36      7) do7=yes;;      7) do7=yes;;
37      8) do8=yes;;      8) do8=yes;;
38      9) do9=yes;;      9) do9=yes;;
39        valgrind) valgrind="valgrind -q";;
40      *) echo "Unknown test number $1"; exit 1;;      *) echo "Unknown test number $1"; exit 1;;
41    esac    esac
42    shift    shift
# Line 110  fi Line 113  fi
113    
114  if [ $do1 = yes ] ; then  if [ $do1 = yes ] ; then
115    echo "Test 1: main functionality (Perl compatible)"    echo "Test 1: main functionality (Perl compatible)"
116    ./pcretest $testdata/testinput1 testtry    $valgrind ./pcretest -q $testdata/testinput1 testtry
117    if [ $? = 0 ] ; then    if [ $? = 0 ] ; then
118      $cf testtry $testdata/testoutput1      $cf testtry $testdata/testoutput1
119      if [ $? != 0 ] ; then exit 1; fi      if [ $? != 0 ] ; then exit 1; fi
# Line 125  fi Line 128  fi
128  if [ $do2 = yes ] ; then  if [ $do2 = yes ] ; then
129    if [ "@LINK_SIZE@" = "" -o "@LINK_SIZE@" = "-DLINK_SIZE=2" ] ; then    if [ "@LINK_SIZE@" = "" -o "@LINK_SIZE@" = "-DLINK_SIZE=2" ] ; then
130      echo "Test 2: API and error handling (not Perl compatible)"      echo "Test 2: API and error handling (not Perl compatible)"
131      ./pcretest -i $testdata/testinput2 testtry      $valgrind ./pcretest -q -i $testdata/testinput2 testtry
132      if [ $? = 0 ] ; then      if [ $? = 0 ] ; then
133        $cf testtry $testdata/testoutput2        $cf testtry $testdata/testoutput2
134        if [ $? != 0 ] ; then exit 1; fi        if [ $? != 0 ] ; then exit 1; fi
# Line 145  if [ $do3 = yes ] ; then Line 148  if [ $do3 = yes ] ; then
148    locale -a | grep '^fr_FR$' >/dev/null    locale -a | grep '^fr_FR$' >/dev/null
149    if [ $? -eq 0 ] ; then    if [ $? -eq 0 ] ; then
150      echo "Test 3: locale-specific features (using 'fr_FR' locale)"      echo "Test 3: locale-specific features (using 'fr_FR' locale)"
151      ./pcretest $testdata/testinput3 testtry      $valgrind ./pcretest -q $testdata/testinput3 testtry
152      if [ $? = 0 ] ; then      if [ $? = 0 ] ; then
153        $cf testtry $testdata/testoutput3        $cf testtry $testdata/testoutput3
154        if [ $? != 0 ] ; then        if [ $? != 0 ] ; then
# Line 170  fi Line 173  fi
173    
174  if [ $do4 = yes ] ; then  if [ $do4 = yes ] ; then
175    echo "Test 4: UTF-8 support (Perl compatible)"    echo "Test 4: UTF-8 support (Perl compatible)"
176    ./pcretest $testdata/testinput4 testtry    $valgrind ./pcretest -q $testdata/testinput4 testtry
177    if [ $? = 0 ] ; then    if [ $? = 0 ] ; then
178      $cf testtry $testdata/testoutput4      $cf testtry $testdata/testoutput4
179      if [ $? != 0 ] ; then exit 1; fi      if [ $? != 0 ] ; then exit 1; fi
# Line 183  fi Line 186  fi
186  if [ $do5 = yes ] ; then  if [ $do5 = yes ] ; then
187    if [ "@LINK_SIZE@" = "" -o "@LINK_SIZE@" = "-DLINK_SIZE=2" ] ; then    if [ "@LINK_SIZE@" = "" -o "@LINK_SIZE@" = "-DLINK_SIZE=2" ] ; then
188      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)"
189      ./pcretest $testdata/testinput5 testtry      $valgrind ./pcretest -q $testdata/testinput5 testtry
190      if [ $? = 0 ] ; then      if [ $? = 0 ] ; then
191        $cf testtry $testdata/testoutput5        $cf testtry $testdata/testoutput5
192        if [ $? != 0 ] ; then exit 1; fi        if [ $? != 0 ] ; then exit 1; fi
# Line 200  fi Line 203  fi
203  if [ $do6 = yes ] ; then  if [ $do6 = yes ] ; then
204    if [ "@LINK_SIZE@" = "" -o "@LINK_SIZE@" = "-DLINK_SIZE=2" ] ; then    if [ "@LINK_SIZE@" = "" -o "@LINK_SIZE@" = "-DLINK_SIZE=2" ] ; then
205      echo "Test 6: Unicode property support"      echo "Test 6: Unicode property support"
206      ./pcretest $testdata/testinput6 testtry      $valgrind ./pcretest -q $testdata/testinput6 testtry
207      if [ $? = 0 ] ; then      if [ $? = 0 ] ; then
208        $cf testtry $testdata/testoutput6        $cf testtry $testdata/testoutput6
209        if [ $? != 0 ] ; then exit 1; fi        if [ $? != 0 ] ; then exit 1; fi
# Line 218  fi Line 221  fi
221    
222  if [ $do7 = yes ] ; then  if [ $do7 = yes ] ; then
223    echo "Test 7: DFA matching"    echo "Test 7: DFA matching"
224    ./pcretest -dfa $testdata/testinput7 testtry    $valgrind ./pcretest -q -dfa $testdata/testinput7 testtry
225    if [ $? = 0 ] ; then    if [ $? = 0 ] ; then
226      $cf testtry $testdata/testoutput7      $cf testtry $testdata/testoutput7
227      if [ $? != 0 ] ; then exit 1; fi      if [ $? != 0 ] ; then exit 1; fi
# Line 230  fi Line 233  fi
233    
234  if [ $do8 = yes ] ; then  if [ $do8 = yes ] ; then
235    echo "Test 8: DFA matching with UTF-8"    echo "Test 8: DFA matching with UTF-8"
236    ./pcretest -dfa $testdata/testinput8 testtry    $valgrind ./pcretest -q -dfa $testdata/testinput8 testtry
237    if [ $? = 0 ] ; then    if [ $? = 0 ] ; then
238      $cf testtry $testdata/testoutput8      $cf testtry $testdata/testoutput8
239      if [ $? != 0 ] ; then exit 1; fi      if [ $? != 0 ] ; then exit 1; fi
# Line 242  fi Line 245  fi
245    
246  if [ $do9 = yes ] ; then  if [ $do9 = yes ] ; then
247    echo "Test 9: DFA matching with Unicode properties"    echo "Test 9: DFA matching with Unicode properties"
248    ./pcretest -dfa $testdata/testinput9 testtry    $valgrind ./pcretest -q -dfa $testdata/testinput9 testtry
249    if [ $? = 0 ] ; then    if [ $? = 0 ] ; then
250      $cf testtry $testdata/testoutput9      $cf testtry $testdata/testoutput9
251      if [ $? != 0 ] ; then exit 1; fi      if [ $? != 0 ] ; then exit 1; fi

Legend:
Removed from v.86  
changed lines
  Added in v.87

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12