summaryrefslogtreecommitdiff
path: root/RunGrepTest
diff options
context:
space:
mode:
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