chiark / gitweb /
Merge from existing archive branch
[pcre3.git] / RunGrepTest
index f1b034840676ceedee5eea38ebd205ad3c604628..721ec5184ab4d919386d5ef3bc7e9db3a7ec6ca5 100755 (executable)
@@ -67,6 +67,15 @@ fi
 ./pcretest -C utf >/dev/null
 utf8=$?
 
+# We need valgrind suppressions when JIT is in use. (This isn't perfect because
+# some tests are run with -no-jit, but as PCRE1 is in maintenance only, I have
+# not bothered about that.)
+
+./pcretest -C jit >/dev/null
+if [ $? -eq 1 -a "$valgrind" != "" ] ; then
+  valgrind="$valgrind --suppressions=./testdata/valgrind-jit.supp"
+fi
+
 echo "Testing pcregrep main features"
 
 echo "---------------------------- Test 1 ------------------------------" >testtrygrep
@@ -506,6 +515,19 @@ echo "---------------------------- Test 106 -----------------------------" >>tes
 (cd $srcdir; echo "a" | $valgrind $pcregrep -M "|a" ) >>testtrygrep 2>&1
 echo "RC=$?" >>testtrygrep
 
+echo "---------------------------- Test 107 -----------------------------" >>testtrygrep
+echo "a" >testtemp1grep
+echo "aaaaa" >>testtemp1grep
+(cd $srcdir; $valgrind $pcregrep  --line-offsets '(?<=\Ka)' $builddir/testtemp1grep) >>testtrygrep 2>&1
+echo "RC=$?" >>testtrygrep
+
+echo "---------------------------- Test 108 ------------------------------" >>testtrygrep
+(cd $srcdir; $valgrind $pcregrep -lq PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtrygrep
+echo "RC=$?" >>testtrygrep
+
+echo "---------------------------- Test 109 -----------------------------" >>testtrygrep
+(cd $srcdir; $valgrind $pcregrep -cq lazy ./testdata/grepinput*) >>testtrygrep
+echo "RC=$?" >>testtrygrep
 
 # Now compare the results.