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

Diff of /code/trunk/RunTest

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

revision 245 by ph10, Fri Sep 14 10:06:05 2007 UTC revision 345 by ph10, Mon Apr 28 15:10:02 2008 UTC
# Line 1  Line 1 
1  #! /bin/sh  #! /bin/sh
2    
3  # Run PCRE tests  # Run PCRE tests.
4    
 cf="diff -u"  
5  valgrind=  valgrind=
 testdata=testdata  
6    
7    # Set up a suitable "diff" command for comparison. Some systems
8    # have a diff that lacks a -u option. Try to deal with this.
9    
10    if diff -u /dev/null /dev/null; then cf="diff -u"; else cf="diff"; fi
11    
12    # Find the test data
13    
14    testdata=testdata
15  if [ -n "$srcdir" -a -d "$srcdir" ] ; then  if [ -n "$srcdir" -a -d "$srcdir" ] ; then
16    testdata="$srcdir/testdata"    testdata="$srcdir/testdata"
17  fi  fi
# Line 25  utf8=$? Line 31  utf8=$?
31  ./pcretest -C | ./pcregrep 'No Unicode properties support' >/dev/null  ./pcretest -C | ./pcregrep 'No Unicode properties support' >/dev/null
32  ucp=$?  ucp=$?
33    
 ./pcretest -C | ./pcregrep '\\R matches CR, LF, or CRLF only' >/dev/null  
 bsrok=$?  
   
34  # Select which tests to run; for those that are explicitly requested, check  # Select which tests to run; for those that are explicitly requested, check
35  # that the necessary optional facilities are available.  # that the necessary optional facilities are available.
36    
# Line 97  if [ $link_size -ne 2 ] ; then Line 100  if [ $link_size -ne 2 ] ; then
100    fi    fi
101  fi  fi
102    
 if [ $bsrok = 0 ] ; then  
   if [ $do2 = yes ] ; then  
     echo "Can't run test 2 because \\R is restricted"  
     exit 1  
   fi  
   if [ $do5 = yes ] ; then  
     echo "Can't run test 5 because \\R is restricted"  
     exit 1  
   fi  
   if [ $do7 = yes ] ; then  
     echo "Can't run test 7 because \\R is restricted"  
     exit 1  
   fi  
   if [ $do8 = yes ] ; then  
     echo "Can't run test 8 because \\R is restricted"  
     exit 1  
   fi  
 fi  
   
103  # If no specific tests were requested, select all that are relevant.  # If no specific tests were requested, select all that are relevant.
104    
105  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 \
106       $do5 = no -a $do6 = no -a $do7 = no -a $do8 = no -a \       $do5 = no -a $do6 = no -a $do7 = no -a $do8 = no -a \
107       $do9 = no -a $do10 = no ] ; then       $do9 = no -a $do10 = no ] ; then
108    do1=yes    do1=yes
109    if [ $bsrok -ne 0 ] ; then do2=yes; fi    do2=yes
110    do3=yes    do3=yes
111    if [ $utf8 -ne 0 ] ; then do4=yes; fi    if [ $utf8 -ne 0 ] ; then do4=yes; fi
112    if [ $utf8 -ne 0 -a $bsrok -ne 0 ] ; then do5=yes; fi    if [ $utf8 -ne 0 ] ; then do5=yes; fi
113    if [ $utf8 -ne 0 -a $ucp -ne 0 ] ; then do6=yes; fi    if [ $utf8 -ne 0 -a $ucp -ne 0 ] ; then do6=yes; fi
114    if [ $bsrok -ne 0 ] ; then do7=yes; fi    do7=yes
115    if [ $utf8 -ne 0 -a $bsrok -ne 0 ] ; then do8=yes; fi    if [ $utf8 -ne 0 ] ; then do8=yes; fi
116    if [ $utf8 -ne 0 -a $ucp -ne 0 ] ; then do9=yes; fi    if [ $utf8 -ne 0 -a $ucp -ne 0 ] ; then do9=yes; fi
117    if [ $link_size -eq 2 -a $ucp -ne 0 ] ; then do10=yes; fi    if [ $link_size -eq 2 -a $ucp -ne 0 ] ; then do10=yes; fi
118  fi  fi

Legend:
Removed from v.245  
changed lines
  Added in v.345

  ViewVC Help
Powered by ViewVC 1.1.5