summaryrefslogtreecommitdiff
path: root/RunGrepTest
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-01-12 17:21:11 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2011-01-12 17:21:11 +0000
commit43dd45d037e060f41e7a6258b8a89a1037e255dc (patch)
tree4b9116b20a432cbf574fafb5de3e1aba59c9b0ee /RunGrepTest
parentd969301e704b4c098dac92cace9c8770599b15e7 (diff)
downloadpcre-43dd45d037e060f41e7a6258b8a89a1037e255dc.tar.gz
Fix pcregrep bug when --colour was used with -v.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@585 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'RunGrepTest')
-rwxr-xr-xRunGrepTest19
1 files changed, 14 insertions, 5 deletions
diff --git a/RunGrepTest b/RunGrepTest
index 0b310af..26ad6a1 100755
--- a/RunGrepTest
+++ b/RunGrepTest
@@ -10,19 +10,24 @@ export LC_ALL
pcregrep=`pwd`/pcregrep
-echo " "
-echo "Testing pcregrep"
-$pcregrep -V
-
valgrind=
while [ $# -gt 0 ] ; do
case $1 in
valgrind) valgrind="valgrind -q --leak-check=no";;
- *) echo "Unknown argument $1"; exit 1;;
+ *) echo "RunGrepTest: Unknown argument $1"; exit 1;;
esac
shift
done
+echo " "
+if [ "$valgrind" = "" ] ; then
+ echo "Testing pcregrep"
+else
+ echo "Testing pcregrep using valgrind"
+fi
+
+$pcregrep -V
+
cf="diff -ub"
# Set up a suitable "diff" command for comparison. Some systems have a diff
@@ -327,6 +332,10 @@ echo "---------------------------- Test 68 ------------------------------" >>tes
(cd $srcdir; $valgrind $pcregrep --only-matching=2 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtry
echo "RC=$?" >>testtry
+echo "---------------------------- Test 69 -----------------------------" >>testtry
+(cd $srcdir; $valgrind $pcregrep -vn --colour=always pattern ./testdata/grepinputx) >>testtry
+echo "RC=$?" >>testtry
+
# Now compare the results.
$cf $srcdir/testdata/grepoutput testtry