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

Diff of /code/trunk/RunTest.in

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

revision 63 by nigel, Sat Feb 24 21:40:03 2007 UTC revision 75 by nigel, Sat Feb 24 21:40:37 2007 UTC
# Line 15  do2=no Line 15  do2=no
15  do3=no  do3=no
16  do4=no  do4=no
17  do5=no  do5=no
18    do6=no
19    
20  while [ $# -gt 0 ] ; do  while [ $# -gt 0 ] ; do
21    case $1 in    case $1 in
# Line 23  while [ $# -gt 0 ] ; do Line 24  while [ $# -gt 0 ] ; do
24      3) do3=yes;;      3) do3=yes;;
25      4) do4=yes;;      4) do4=yes;;
26      5) do5=yes;;      5) do5=yes;;
27        6) do6=yes;;
28      *) echo "Unknown test number $1"; exit 1;;      *) echo "Unknown test number $1"; exit 1;;
29    esac    esac
30    shift    shift
31  done  done
32    
33    if [ "@LINK_SIZE@" != "" -a "@LINK_SIZE@" != "-DLINK_SIZE=2" ] ; then
34      if [ $do2 = yes ] ; then
35        echo "Can't run test 2 with an internal link size other than 2"
36        exit 1
37      fi
38      if [ $do5 = yes ] ; then
39        echo "Can't run test 5 with an internal link size other than 2"
40        exit 1
41      fi
42      if [ $do6 = yes ] ; then
43        echo "Can't run test 6 with an internal link size other than 2"
44        exit 1
45      fi
46    fi
47    
48  if [ "@UTF8@" = "" ] ; then  if [ "@UTF8@" = "" ] ; then
49    if [ $do4 = yes ] ; then    if [ $do4 = yes ] ; then
50      echo "Can't run test 4 because UFT8 support is not configured"      echo "Can't run test 4 because UTF-8 support is not configured"
51      exit 1      exit 1
52    fi    fi
53    if [ $do5 = yes ] ; then    if [ $do5 = yes ] ; then
54      echo "Can't run test 5 because UFT8 support is not configured"      echo "Can't run test 5 because UTF-8 support is not configured"
55        exit 1
56      fi
57      if [ $do6 = yes ] ; then
58        echo "Can't run test 6 because UTF-8 support is not configured"
59      exit 1      exit 1
60    fi    fi
61  fi  fi
62    
63  if [ $do1 = no -a $do2 = no -a $do3 = no -a $do4 = no -a\  if [ "@UCP@" = "" ] ; then
64       $do5 = no ] ; then    if [ $do6 = yes ] ; then
65        echo "Can't run test 6 because Unicode property support is not configured"
66        exit 1
67      fi
68    fi
69    
70    if [ $do1 = no -a $do2 = no -a $do3 = no -a $do4 = no -a \
71         $do5 = no -a $do6 = no ] ; then
72    do1=yes    do1=yes
73    do2=yes    do2=yes
74    do3=yes    do3=yes
75    if [ "@UTF8@" != "" ] ; then do4=yes; fi    if [ "@UTF8@" != "" ] ; then do4=yes; fi
76    if [ "@UTF8@" != "" ] ; then do5=yes; fi    if [ "@UTF8@" != "" ] ; then do5=yes; fi
77      if [ "@UTF8@" != "" -a "@UCP@" != "" ] ; then do6=yes; fi
78  fi  fi
79    
80    # Show which release
81    
82    ./pcretest /dev/null
83    
84  # Primary test, Perl-compatible  # Primary test, Perl-compatible
85    
86  if [ $do1 = yes ] ; then  if [ $do1 = yes ] ; then
87    echo "Testing main functionality (Perl compatible)"    echo "Test 1: main functionality (Perl compatible)"
88    ./pcretest $testdata/testinput1 testtry    ./pcretest $testdata/testinput1 testtry
89    if [ $? = 0 ] ; then    if [ $? = 0 ] ; then
90      $cf testtry $testdata/testoutput1      $cf testtry $testdata/testoutput1
# Line 64  fi Line 97  fi
97  # PCRE tests that are not Perl-compatible - API & error tests, mostly  # PCRE tests that are not Perl-compatible - API & error tests, mostly
98    
99  if [ $do2 = yes ] ; then  if [ $do2 = yes ] ; then
100    echo "Testing API and error handling (not Perl compatible)"    if [ "@LINK_SIZE@" = "" -o "@LINK_SIZE@" = "-DLINK_SIZE=2" ] ; then
101    ./pcretest -i $testdata/testinput2 testtry      echo "Test 2: API and error handling (not Perl compatible)"
102    if [ $? = 0 ] ; then      ./pcretest -i $testdata/testinput2 testtry
103      $cf testtry $testdata/testoutput2      if [ $? = 0 ] ; then
104      if [ $? != 0 ] ; then exit 1; fi        $cf testtry $testdata/testoutput2
105    else exit 1        if [ $? != 0 ] ; then exit 1; fi
106    fi      else exit 1
107        fi
108      else
109        echo Test 2 skipped for link size other than 2 \(@LINK_SIZE@\)
110      fi
111  fi  fi
112    
113  if [ $do1 = yes -a $do2 = yes ] ; then  if [ $do1 = yes -a $do2 = yes ] ; then
# Line 79  if [ $do1 = yes -a $do2 = yes ] ; then Line 116  if [ $do1 = yes -a $do2 = yes ] ; then
116    echo " "    echo " "
117  fi  fi
118    
119  # Locale-specific tests, provided the "fr" locale is available  # Locale-specific tests, provided the "fr_FR" locale is available
120    
121  if [ $do3 = yes ] ; then  if [ $do3 = yes ] ; then
122    locale -a | grep '^fr$' >/dev/null    locale -a | grep '^fr_FR$' >/dev/null
123    if [ $? -eq 0 ] ; then    if [ $? -eq 0 ] ; then
124      echo "Testing locale-specific features (using 'fr' locale)"      echo "Test 3: locale-specific features (using 'fr_FR' locale)"
125      ./pcretest $testdata/testinput3 testtry      ./pcretest $testdata/testinput3 testtry
126      if [ $? = 0 ] ; then      if [ $? = 0 ] ; then
127        $cf testtry $testdata/testoutput3        $cf testtry $testdata/testoutput3
# Line 100  if [ $do3 = yes ] ; then Line 137  if [ $do3 = yes ] ; then
137      else exit 1      else exit 1
138      fi      fi
139    else    else
140      echo "Cannot test locale-specific features - 'fr' locale not found,"      echo "Cannot test locale-specific features - 'fr_FR' locale not found,"
141      echo "or the \"locale\" command is not available to check for it."      echo "or the \"locale\" command is not available to check for it."
142      echo " "      echo " "
143    fi    fi
# Line 109  fi Line 146  fi
146  # Additional tests for UTF8 support  # Additional tests for UTF8 support
147    
148  if [ $do4 = yes ] ; then  if [ $do4 = yes ] ; then
149    echo "Testing UTF-8 support (Perl compatible)"    echo "Test 4: UTF-8 support (Perl compatible)"
150    ./pcretest $testdata/testinput4 testtry    ./pcretest $testdata/testinput4 testtry
151    if [ $? = 0 ] ; then    if [ $? = 0 ] ; then
152      $cf testtry $testdata/testoutput4      $cf testtry $testdata/testoutput4
# Line 121  if [ $do4 = yes ] ; then Line 158  if [ $do4 = yes ] ; then
158  fi  fi
159    
160  if [ $do5 = yes ] ; then  if [ $do5 = yes ] ; then
161    echo "Testing API and internals for UTF-8 support (not Perl compatible)"    if [ "@LINK_SIZE@" = "" -o "@LINK_SIZE@" = "-DLINK_SIZE=2" ] ; then
162    ./pcretest $testdata/testinput5 testtry      echo "Test 5: API and internals for UTF-8 support (not Perl compatible)"
163    if [ $? = 0 ] ; then      ./pcretest $testdata/testinput5 testtry
164      $cf testtry $testdata/testoutput5      if [ $? = 0 ] ; then
165      if [ $? != 0 ] ; then exit 1; fi        $cf testtry $testdata/testoutput5
166    else exit 1        if [ $? != 0 ] ; then exit 1; fi
167    fi      else exit 1
168    echo "UTF8 internals test ran OK"      fi
169    echo " "      echo "UTF8 internals test ran OK"
170        echo " "
171      else
172        echo Test 5 skipped for link size other than 2 \(@LINK_SIZE@\)
173      fi
174    fi
175    
176    if [ $do6 = yes ] ; then
177      if [ "@LINK_SIZE@" = "" -o "@LINK_SIZE@" = "-DLINK_SIZE=2" ] ; then
178        echo "Test 6: Unicode property support"
179        ./pcretest $testdata/testinput6 testtry
180        if [ $? = 0 ] ; then
181          $cf testtry $testdata/testoutput6
182          if [ $? != 0 ] ; then exit 1; fi
183        else exit 1
184        fi
185        echo "Unicode properties test ran OK"
186        echo " "
187      else
188        echo Test 6 skipped for link size other than 2 \(@LINK_SIZE@\)
189      fi
190  fi  fi
191    
192  # End  # End

Legend:
Removed from v.63  
changed lines
  Added in v.75

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12