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

Diff of /code/trunk/RunTest

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

revision 689 by ph10, Fri Sep 9 10:34:57 2011 UTC revision 706 by ph10, Fri Sep 23 10:11:35 2011 UTC
# Line 18  Line 18 
18  # two tests for JIT-specific features, one to be run when JIT support is  # two tests for JIT-specific features, one to be run when JIT support is
19  # available, and one when it is not.  # available, and one when it is not.
20    
21  # The arguments for this script can be individual test numbers, or the word  # The arguments for this script can be individual test numbers, or the word
22  # "valgrind", or "sim" followed by an argument to run cross-compiled  # "valgrind", or "sim" followed by an argument to run cross-compiled
23  # executables under a simulator, for example:  # executables under a simulator, for example:
24  #  #
25  # RunTest 3 sim "qemu-arm -s 8388608"  # RunTest 3 sim "qemu-arm -s 8388608"
# Line 77  if diff -u /dev/null /dev/null; then cf= Line 77  if diff -u /dev/null /dev/null; then cf=
77    
78  # Find the test data  # Find the test data
79    
 testdata=testdata  
80  if [ -n "$srcdir" -a -d "$srcdir" ] ; then  if [ -n "$srcdir" -a -d "$srcdir" ] ; then
81    testdata="$srcdir/testdata"    testdata="$srcdir/testdata"
82    elif [ -d "./testdata" ] ; then
83      testdata=./testdata
84    elif [ -d "../testdata" ] ; then
85      testdata=../testdata
86    else
87      echo "Cannot find the testdata directory"
88      exit 1
89  fi  fi
90    
91  # Find which optional facilities are available  # Find which optional facilities are available
# Line 186  if [ $do1  = no -a $do2  = no -a $do3  = Line 192  if [ $do1  = no -a $do2  = no -a $do3  =
192    do15=yes    do15=yes
193  fi  fi
194    
195  # Show which release  # Show which release and which test data
196    
197  echo ""  echo ""
198  echo PCRE C library tests  echo PCRE C library tests using test data from $testdata
199  ./pcretest /dev/null  $sim ./pcretest /dev/null
200    
201  # Primary test, compatible with JIT and all versions of Perl >= 5.8  # Primary test, compatible with JIT and all versions of Perl >= 5.8
202    
# Line 237  fi Line 243  fi
243    
244  # Locale-specific tests, provided that either the "fr_FR" or the "french"  # Locale-specific tests, provided that either the "fr_FR" or the "french"
245  # locale is available. The former is the Unix-like standard; the latter is  # locale is available. The former is the Unix-like standard; the latter is
246  # for Windows.  # for Windows. Another possibility is "fr", which needs to be run against
247    # the Windows-specific input and output files.
248    
249  if [ $do3 = yes ] ; then  if [ $do3 = yes ] ; then
250    locale -a | grep '^fr_FR$' >/dev/null    locale -a | grep '^fr_FR$' >/dev/null
# Line 246  if [ $do3 = yes ] ; then Line 253  if [ $do3 = yes ] ; then
253      infile=$testdata/testinput3      infile=$testdata/testinput3
254      outfile=$testdata/testoutput3      outfile=$testdata/testoutput3
255    else    else
256        infile=test3input
257        outfile=test3output
258      locale -a | grep '^french$' >/dev/null      locale -a | grep '^french$' >/dev/null
259      if [ $? -eq 0 ] ; then      if [ $? -eq 0 ] ; then
260        locale=french        locale=french
261        sed 's/fr_FR/french/' $testdata/testinput3 >test3input        sed 's/fr_FR/french/' $testdata/testinput3 >test3input
262        sed 's/fr_FR/french/' $testdata/testoutput3 >test3output        sed 's/fr_FR/french/' $testdata/testoutput3 >test3output
       infile=test3input  
       outfile=test3output  
263      else      else
264        locale=        locale -a | grep '^fr$' >/dev/null
265          if [ $? -eq 0 ] ; then
266            locale=fr
267            sed 's/fr_FR/fr/' $testdata/wintestinput3 >test3input
268            sed 's/fr_FR/fr/' $testdata/wintestoutput3 >test3output
269          else
270            locale=
271          fi
272      fi      fi
273    fi    fi
274    

Legend:
Removed from v.689  
changed lines
  Added in v.706

  ViewVC Help
Powered by ViewVC 1.1.5