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

Diff of /code/trunk/RunGrepTest

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

revision 96 by nigel, Fri Mar 2 13:10:43 2007 UTC revision 97 by ph10, Mon Mar 5 12:36:47 2007 UTC
# Line 3  Line 3 
3  # This file is generated by configure from RunGrepTest.in. Make any changes  # This file is generated by configure from RunGrepTest.in. Make any changes
4  # to that file.  # to that file.
5    
6    # Set the C locale, so that sort(1) behaves predictably.
7    LC_ALL=C
8    export LC_ALL
9    
10  echo "Testing pcregrep"  echo "Testing pcregrep"
11  ./pcregrep -V  ./pcregrep -V
12    
# Line 10  echo "Testing pcregrep" Line 14  echo "Testing pcregrep"
14  # itself. What we are checking here is the file handling and options that are  # itself. What we are checking here is the file handling and options that are
15  # supported by pcregrep.  # supported by pcregrep.
16    
17  cf=diff  cf="diff -u"
18  valgrind=  valgrind=
19  if [ ! -d testdata ] ; then  if [ ! -d testdata ] ; then
20    ln -s @top_srcdir@/testdata testdata    ln -s @top_srcdir@/testdata testdata
# Line 19  testdata=./testdata Line 23  testdata=./testdata
23    
24  while [ $# -gt 0 ] ; do  while [ $# -gt 0 ] ; do
25    case $1 in    case $1 in
26      valgrind) valgrind="valgrind -q --leak-check=no";;      valgrind) valgrind="valgrind -q --leak-check=no";;
27      *) echo "Unknown argument $1"; exit 1;;      *) echo "Unknown argument $1"; exit 1;;
28    esac    esac
29    shift    shift
# Line 127  echo "---------------------------- Test Line 131  echo "---------------------------- Test
131  $valgrind ./pcregrep -L 'fox' $testdata/grepinput $testdata/grepinputx >>testtry  $valgrind ./pcregrep -L 'fox' $testdata/grepinput $testdata/grepinputx >>testtry
132    
133  echo "---------------------------- Test 33 -----------------------------" >>testtry  echo "---------------------------- Test 33 -----------------------------" >>testtry
134  $valgrind ./pcregrep 'fox' $testdata/grepnonexist >>testtry 2>&1  $valgrind ./pcregrep 'fox' $testdata/grepnonexist >>testtry 2>&1
135  echo "RC=$?" >>testtry  echo "RC=$?" >>testtry
136    
137  echo "---------------------------- Test 34 -----------------------------" >>testtry  echo "---------------------------- Test 34 -----------------------------" >>testtry
138  $valgrind ./pcregrep -s 'fox' $testdata/grepnonexist >>testtry 2>&1  $valgrind ./pcregrep -s 'fox' $testdata/grepnonexist >>testtry 2>&1
139  echo "RC=$?" >>testtry  echo "RC=$?" >>testtry
140    
141  echo "---------------------------- Test 35 -----------------------------" >>testtry  echo "---------------------------- Test 35 -----------------------------" >>testtry
142  $valgrind ./pcregrep -L -r --include=grepinputx 'fox' $testdata >>testtry  $valgrind ./pcregrep -L -r --include=grepinputx 'fox' $testdata >>testtry
143  echo "RC=$?" >>testtry  echo "RC=$?" >>testtry
144    
145  echo "---------------------------- Test 36 -----------------------------" >>testtry  echo "---------------------------- Test 36 -----------------------------" >>testtry
146  $valgrind ./pcregrep -L -r --include=grepinput --exclude 'grepinput$' 'fox' $testdata >>testtry  $valgrind ./pcregrep -L -r --include=grepinput --exclude 'grepinput$' 'fox' $testdata | sort >>testtry
147  echo "RC=$?" >>testtry  echo "RC=$?" >>testtry
148    
149  echo "---------------------------- Test 37 -----------------------------" >>testtry  echo "---------------------------- Test 37 -----------------------------" >>testtry
# Line 197  echo "---------------------------- Test Line 201  echo "---------------------------- Test
201  $valgrind ./pcregrep --newline=crlf "^(abc|def|ghi|jkl)" $testdata/grepinputx >>testtry  $valgrind ./pcregrep --newline=crlf "^(abc|def|ghi|jkl)" $testdata/grepinputx >>testtry
202    
203  echo "---------------------------- Test 52 ------------------------------" >>testtry  echo "---------------------------- Test 52 ------------------------------" >>testtry
204  $valgrind ./pcregrep --newline=cr -F "def jkl" $testdata/grepinputx >>testtry  pattern=`printf 'def\rjkl'`
205    $valgrind ./pcregrep --newline=cr -F "$pattern" $testdata/grepinputx >>testtry
206    
207  echo "---------------------------- Test 53 ------------------------------" >>testtry  echo "---------------------------- Test 53 ------------------------------" >>testtry
208  $valgrind ./pcregrep --newline=crlf -F "xxx  pattern=`printf 'xxx\r\njkl'`
209  jkl" $testdata/grepinputx >>testtry  $valgrind ./pcregrep --newline=crlf -F "$pattern" $testdata/grepinputx >>testtry
210    
211  echo "---------------------------- Test 54 ------------------------------" >>testtry  echo "---------------------------- Test 54 ------------------------------" >>testtry
212  $valgrind ./pcregrep -n --newline=any "^(abc|def|ghi|jkl)" $testdata/grepinputx >>testtry  $valgrind ./pcregrep -n --newline=any "^(abc|def|ghi|jkl)" $testdata/grepinputx >>testtry
# Line 215  if [ $? != 0 ] ; then exit 1; fi Line 220  if [ $? != 0 ] ; then exit 1; fi
220    
221  if [ $no_utf8 -ne 0 ] ; then  if [ $no_utf8 -ne 0 ] ; then
222    echo "Testing pcregrep UTF-8 features"    echo "Testing pcregrep UTF-8 features"
223    
224    echo "---------------------------- Test U1 ------------------------------" >testtry    echo "---------------------------- Test U1 ------------------------------" >testtry
225    $valgrind ./pcregrep -n -u --newline=any "^X" $testdata/grepinput8 >>testtry    $valgrind ./pcregrep -n -u --newline=any "^X" $testdata/grepinput8 >>testtry
226    
# Line 229  else Line 234  else
234    echo "Skipping pcregrep UTF-8 tests: no UTF-8 support in PCRE library"    echo "Skipping pcregrep UTF-8 tests: no UTF-8 support in PCRE library"
235  fi  fi
236    
237  exit 0  exit 0
238    
239  # End  # End

Legend:
Removed from v.96  
changed lines
  Added in v.97

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12