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

Diff of /code/trunk/RunGrepTest

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

revision 571 by ph10, Tue Nov 16 17:51:37 2010 UTC revision 585 by ph10, Wed Jan 12 17:21:11 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";;
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 327  echo "---------------------------- Test Line 332  echo "---------------------------- Test
332  (cd $srcdir; $valgrind $pcregrep --only-matching=2 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep --only-matching=2 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtry
333  echo "RC=$?" >>testtry  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  # Now compare the results.  # Now compare the results.
340    
341  $cf $srcdir/testdata/grepoutput testtry  $cf $srcdir/testdata/grepoutput testtry

Legend:
Removed from v.571  
changed lines
  Added in v.585

  ViewVC Help
Powered by ViewVC 1.1.5