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

Diff of /code/trunk/RunGrepTest

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

revision 564 by ph10, Sun Oct 31 16:07:24 2010 UTC revision 667 by ph10, Mon Aug 22 14:57:32 2011 UTC
# Line 10  export LC_ALL Line 10  export LC_ALL
10    
11  pcregrep=`pwd`/pcregrep  pcregrep=`pwd`/pcregrep
12    
 echo " "  
 echo "Testing pcregrep"  
 $pcregrep -V  
   
13  valgrind=  valgrind=
14  while [ $# -gt 0 ] ; do  while [ $# -gt 0 ] ; do
15    case $1 in    case $1 in
16      valgrind) valgrind="valgrind -q --leak-check=no";;      valgrind) valgrind="valgrind -q --leak-check=no --smc-check=all";;
17      *) echo "Unknown argument $1"; exit 1;;      *) echo "RunGrepTest: Unknown argument $1"; exit 1;;
18    esac    esac
19    shift    shift
20  done  done
21    
22    echo " "
23    if [ "$valgrind" = "" ] ; then
24      echo "Testing pcregrep"
25    else
26      echo "Testing pcregrep using valgrind"
27    fi
28    
29    $pcregrep -V
30    
31  cf="diff -ub"  cf="diff -ub"
32    
33  # Set up a suitable "diff" command for comparison. Some systems have a diff  # Set up a suitable "diff" command for comparison. Some systems have a diff
# Line 187  echo "---------------------------- Test Line 192  echo "---------------------------- Test
192  echo "RC=$?" >>testtry  echo "RC=$?" >>testtry
193    
194  echo "---------------------------- Test 35 -----------------------------" >>testtry  echo "---------------------------- Test 35 -----------------------------" >>testtry
195  (cd $srcdir; $valgrind $pcregrep -L -r --include=grepinputx --exclude_dir='^\.' 'fox' ./testdata) >>testtry  (cd $srcdir; $valgrind $pcregrep -L -r --include=grepinputx --exclude-dir='^\.' 'fox' ./testdata) >>testtry
196  echo "RC=$?" >>testtry  echo "RC=$?" >>testtry
197    
198  echo "---------------------------- Test 36 -----------------------------" >>testtry  echo "---------------------------- Test 36 -----------------------------" >>testtry
# Line 307  echo "---------------------------- Test Line 312  echo "---------------------------- Test
312  (cd $srcdir; $valgrind $pcregrep --recursion-limit=1000 -M 'This is a file(.|\R)*file.' ./testdata/grepinput) >>testtry 2>&1  (cd $srcdir; $valgrind $pcregrep --recursion-limit=1000 -M 'This is a file(.|\R)*file.' ./testdata/grepinput) >>testtry 2>&1
313  echo "RC=$?" >>testtry  echo "RC=$?" >>testtry
314    
315    echo "---------------------------- Test 64 ------------------------------" >>testtry
316    (cd $srcdir; $valgrind $pcregrep -o1 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtry
317    echo "RC=$?" >>testtry
318    
319    echo "---------------------------- Test 65 ------------------------------" >>testtry
320    (cd $srcdir; $valgrind $pcregrep -o2 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtry
321    echo "RC=$?" >>testtry
322    
323    echo "---------------------------- Test 66 ------------------------------" >>testtry
324    (cd $srcdir; $valgrind $pcregrep -o3 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtry
325    echo "RC=$?" >>testtry
326    
327    echo "---------------------------- Test 67 ------------------------------" >>testtry
328    (cd $srcdir; $valgrind $pcregrep -o12 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtry
329    echo "RC=$?" >>testtry
330    
331    echo "---------------------------- Test 68 ------------------------------" >>testtry
332    (cd $srcdir; $valgrind $pcregrep --only-matching=2 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtry
333    echo "RC=$?" >>testtry
334    
335    echo "---------------------------- Test 69 -----------------------------" >>testtry
336    (cd $srcdir; $valgrind $pcregrep -vn --colour=always pattern ./testdata/grepinputx) >>testtry
337    echo "RC=$?" >>testtry
338    
339    echo "---------------------------- Test 70 -----------------------------" >>testtry
340    (cd $srcdir; $valgrind $pcregrep --color=always -M "triple:\t.*\n\n" ./testdata/grepinput3) >>testtry
341    echo "RC=$?" >>testtry
342    
343    echo "---------------------------- Test 71 -----------------------------" >>testtry
344    (cd $srcdir; $valgrind $pcregrep -o "^01|^02|^03" ./testdata/grepinput) >>testtry
345    echo "RC=$?" >>testtry
346    
347    echo "---------------------------- Test 72 -----------------------------" >>testtry
348    (cd $srcdir; $valgrind $pcregrep --color=always "^01|^02|^03" ./testdata/grepinput) >>testtry
349    echo "RC=$?" >>testtry
350    
351    echo "---------------------------- Test 73 -----------------------------" >>testtry
352    (cd $srcdir; $valgrind $pcregrep -o --colour=always "^01|^02|^03" ./testdata/grepinput) >>testtry
353    echo "RC=$?" >>testtry
354    
355    echo "---------------------------- Test 74 -----------------------------" >>testtry
356    (cd $srcdir; $valgrind $pcregrep -o "^01|02|^03" ./testdata/grepinput) >>testtry
357    echo "RC=$?" >>testtry
358    
359    echo "---------------------------- Test 75 -----------------------------" >>testtry
360    (cd $srcdir; $valgrind $pcregrep --color=always "^01|02|^03" ./testdata/grepinput) >>testtry
361    echo "RC=$?" >>testtry
362    
363    echo "---------------------------- Test 76 -----------------------------" >>testtry
364    (cd $srcdir; $valgrind $pcregrep -o --colour=always "^01|02|^03" ./testdata/grepinput) >>testtry
365    echo "RC=$?" >>testtry
366    
367    echo "---------------------------- Test 77 -----------------------------" >>testtry
368    (cd $srcdir; $valgrind $pcregrep -o "^01|^02|03" ./testdata/grepinput) >>testtry
369    echo "RC=$?" >>testtry
370    
371    echo "---------------------------- Test 78 -----------------------------" >>testtry
372    (cd $srcdir; $valgrind $pcregrep --color=always "^01|^02|03" ./testdata/grepinput) >>testtry
373    echo "RC=$?" >>testtry
374    
375    echo "---------------------------- Test 79 -----------------------------" >>testtry
376    (cd $srcdir; $valgrind $pcregrep -o --colour=always "^01|^02|03" ./testdata/grepinput) >>testtry
377    echo "RC=$?" >>testtry
378    
379    echo "---------------------------- Test 80 -----------------------------" >>testtry
380    (cd $srcdir; $valgrind $pcregrep -o "\b01|\b02" ./testdata/grepinput) >>testtry
381    echo "RC=$?" >>testtry
382    
383    echo "---------------------------- Test 81 -----------------------------" >>testtry
384    (cd $srcdir; $valgrind $pcregrep --color=always "\\b01|\\b02" ./testdata/grepinput) >>testtry
385    echo "RC=$?" >>testtry
386    
387    echo "---------------------------- Test 82 -----------------------------" >>testtry
388    (cd $srcdir; $valgrind $pcregrep -o --colour=always "\\b01|\\b02" ./testdata/grepinput) >>testtry
389    echo "RC=$?" >>testtry
390    
391    echo "---------------------------- Test 83 -----------------------------" >>testtry
392    (cd $srcdir; $valgrind $pcregrep --buffer-size=100 "^a" ./testdata/grepinput3) >>testtry 2>&1
393    echo "RC=$?" >>testtry
394    
395  # Now compare the results.  # Now compare the results.
396    
397  $cf $srcdir/testdata/grepoutput testtry  $cf $srcdir/testdata/grepoutput testtry

Legend:
Removed from v.564  
changed lines
  Added in v.667

  ViewVC Help
Powered by ViewVC 1.1.5