Lines Matching +full:valgrind +full:-

18 # Remove any non-default colouring and aliases that the caller may have set.
25 # valgrind settings when requested.
31 if [ ! -x $pcre2grep ] ; then
36 if [ ! -x $pcre2test ] ; then
41 valgrind=
42 while [ $# -gt 0 ] ; do
44 valgrind) valgrind="valgrind -q --leak-check=no --smc-check=all-non-file";;
51 pcre2grep_version=`$pcre2grep -V`
52 if [ "$valgrind" = "" ] ; then
55 echo "Testing $pcre2grep_version using valgrind"
56 $pcre2test -C jit >/dev/null
57 if [ $? -ne 0 ]; then
58 vjs="--suppressions=./testdata/valgrind-jit.supp"
63 # that lacks a -u option. Try to deal with this; better do the test for the -b
67 diff -b /dev/null /dev/null 2>/dev/null && cf="diff -b"
68 diff -u /dev/null /dev/null 2>/dev/null && cf="diff -u"
69 diff -ub /dev/null /dev/null 2>/dev/null && cf="diff -ub"
76 if [ -z "$srcdir" -o ! -d "$srcdir/testdata" ] ; then
77 if [ -d "./testdata" ] ; then
79 elif [ -d "../testdata" ] ; then
87 # Check for the availability of UTF-8 support
89 $pcre2test -C unicode >/dev/null
94 nl=`$pcre2test -C newline`
95 if [ "$nl" != "LF" -a "$nl" != "ANY" -a "$nl" != "ANYCRLF" ]; then
96 pcre2grep="$pcre2grep -N LF"
100 # ------ Function to run and check a special pcre2grep arguments test -------
104 $valgrind $pcre2grep $1 >>testtrygrep 2>&1
105 if [ $? -ne $2 ] ; then
106 echo "** pcre2grep $1 failed - check testtrygrep"
111 # ------ Normal tests ------
115 echo "---------------------------- Test 1 ------------------------------" >testtrygrep
116 (cd $srcdir; $valgrind $vjs $pcre2grep PATTERN ./testdata/grepinput) >>testtrygrep
119 echo "---------------------------- Test 2 ------------------------------" >>testtrygrep
120 (cd $srcdir; $valgrind $vjs $pcre2grep '^PATTERN' ./testdata/grepinput) >>testtrygrep
123 echo "---------------------------- Test 3 ------------------------------" >>testtrygrep
124 (cd $srcdir; $valgrind $vjs $pcre2grep -in PATTERN ./testdata/grepinput) >>testtrygrep
127 echo "---------------------------- Test 4 ------------------------------" >>testtrygrep
128 (cd $srcdir; $valgrind $vjs $pcre2grep -ic PATTERN ./testdata/grepinput) >>testtrygrep
131 echo "---------------------------- Test 5 ------------------------------" >>testtrygrep
132 (cd $srcdir; $valgrind $vjs $pcre2grep -in PATTERN ./testdata/grepinput ./testdata/grepinputx) >>te…
135 echo "---------------------------- Test 6 ------------------------------" >>testtrygrep
136 (cd $srcdir; $valgrind $vjs $pcre2grep -inh PATTERN ./testdata/grepinput ./testdata/grepinputx) >>t…
139 echo "---------------------------- Test 7 ------------------------------" >>testtrygrep
140 (cd $srcdir; $valgrind $vjs $pcre2grep -il PATTERN ./testdata/grepinput ./testdata/grepinputx) >>te…
143 echo "---------------------------- Test 8 ------------------------------" >>testtrygrep
144 (cd $srcdir; $valgrind $vjs $pcre2grep -l PATTERN ./testdata/grepinput ./testdata/grepinputx) >>tes…
147 echo "---------------------------- Test 9 ------------------------------" >>testtrygrep
148 (cd $srcdir; $valgrind $vjs $pcre2grep -q PATTERN ./testdata/grepinput ./testdata/grepinputx) >>tes…
151 echo "---------------------------- Test 10 -----------------------------" >>testtrygrep
152 (cd $srcdir; $valgrind $vjs $pcre2grep -q NEVER-PATTERN ./testdata/grepinput ./testdata/grepinputx)…
155 echo "---------------------------- Test 11 -----------------------------" >>testtrygrep
156 (cd $srcdir; $valgrind $vjs $pcre2grep -vn pattern ./testdata/grepinputx) >>testtrygrep
159 echo "---------------------------- Test 12 -----------------------------" >>testtrygrep
160 (cd $srcdir; $valgrind $vjs $pcre2grep -ix pattern ./testdata/grepinputx) >>testtrygrep
163 echo "---------------------------- Test 13 -----------------------------" >>testtrygrep
165 (cd $srcdir; $valgrind $vjs $pcre2grep -f./testdata/greplist -f $builddir/testtemp1grep ./testdata/…
168 echo "---------------------------- Test 14 -----------------------------" >>testtrygrep
169 (cd $srcdir; $valgrind $vjs $pcre2grep -w pat ./testdata/grepinput ./testdata/grepinputx) >>testtry…
172 echo "---------------------------- Test 15 -----------------------------" >>testtrygrep
173 (cd $srcdir; $valgrind $vjs $pcre2grep 'abc^*' ./testdata/grepinput) >>testtrygrep 2>&1
176 echo "---------------------------- Test 16 -----------------------------" >>testtrygrep
177 (cd $srcdir; $valgrind $vjs $pcre2grep abc ./testdata/grepinput ./testdata/nonexistfile) >>testtryg…
180 echo "---------------------------- Test 17 -----------------------------" >>testtrygrep
181 (cd $srcdir; $valgrind $vjs $pcre2grep -M 'the\noutput' ./testdata/grepinput) >>testtrygrep
184 echo "---------------------------- Test 18 -----------------------------" >>testtrygrep
185 (cd $srcdir; $valgrind $vjs $pcre2grep -Mn '(the\noutput|dog\.\n--)' ./testdata/grepinput) >>testtr…
188 echo "---------------------------- Test 19 -----------------------------" >>testtrygrep
189 (cd $srcdir; $valgrind $vjs $pcre2grep -Mix 'Pattern' ./testdata/grepinputx) >>testtrygrep
192 echo "---------------------------- Test 20 -----------------------------" >>testtrygrep
193 (cd $srcdir; $valgrind $vjs $pcre2grep -Mixn 'complete pair\nof lines' ./testdata/grepinputx) >>tes…
196 echo "---------------------------- Test 21 -----------------------------" >>testtrygrep
197 (cd $srcdir; $valgrind $vjs $pcre2grep -nA3 'four' ./testdata/grepinputx) >>testtrygrep
200 echo "---------------------------- Test 22 -----------------------------" >>testtrygrep
201 (cd $srcdir; $valgrind $vjs $pcre2grep -nB3 'four' ./testdata/grepinputx) >>testtrygrep
204 echo "---------------------------- Test 23 -----------------------------" >>testtrygrep
205 (cd $srcdir; $valgrind $vjs $pcre2grep -C3 'four' ./testdata/grepinputx) >>testtrygrep
208 echo "---------------------------- Test 24 -----------------------------" >>testtrygrep
209 (cd $srcdir; $valgrind $vjs $pcre2grep -A9 'four' ./testdata/grepinputx) >>testtrygrep
212 echo "---------------------------- Test 25 -----------------------------" >>testtrygrep
213 (cd $srcdir; $valgrind $vjs $pcre2grep -nB9 'four' ./testdata/grepinputx) >>testtrygrep
216 echo "---------------------------- Test 26 -----------------------------" >>testtrygrep
217 (cd $srcdir; $valgrind $vjs $pcre2grep -A9 -B9 'four' ./testdata/grepinputx) >>testtrygrep
220 echo "---------------------------- Test 27 -----------------------------" >>testtrygrep
221 (cd $srcdir; $valgrind $vjs $pcre2grep -A10 'four' ./testdata/grepinputx) >>testtrygrep
224 echo "---------------------------- Test 28 -----------------------------" >>testtrygrep
225 (cd $srcdir; $valgrind $vjs $pcre2grep -nB10 'four' ./testdata/grepinputx) >>testtrygrep
228 echo "---------------------------- Test 29 -----------------------------" >>testtrygrep
229 (cd $srcdir; $valgrind $vjs $pcre2grep -C12 -B10 'four' ./testdata/grepinputx) >>testtrygrep
232 echo "---------------------------- Test 30 -----------------------------" >>testtrygrep
233 (cd $srcdir; $valgrind $vjs $pcre2grep -inB3 'pattern' ./testdata/grepinput ./testdata/grepinputx) …
236 echo "---------------------------- Test 31 -----------------------------" >>testtrygrep
237 (cd $srcdir; $valgrind $vjs $pcre2grep -inA3 'pattern' ./testdata/grepinput ./testdata/grepinputx) …
240 echo "---------------------------- Test 32 -----------------------------" >>testtrygrep
241 (cd $srcdir; $valgrind $vjs $pcre2grep -L 'fox' ./testdata/grepinput ./testdata/grepinputx) >>testt…
244 echo "---------------------------- Test 33 -----------------------------" >>testtrygrep
245 (cd $srcdir; $valgrind $vjs $pcre2grep 'fox' ./testdata/grepnonexist) >>testtrygrep 2>&1
248 echo "---------------------------- Test 34 -----------------------------" >>testtrygrep
249 (cd $srcdir; $valgrind $vjs $pcre2grep -s 'fox' ./testdata/grepnonexist) >>testtrygrep 2>&1
252 echo "---------------------------- Test 35 -----------------------------" >>testtrygrep
253 (cd $srcdir; $valgrind $vjs $pcre2grep -L -r --include=grepinputx --include grepinput8 --exclude-di…
256 echo "---------------------------- Test 36 -----------------------------" >>testtrygrep
257 …cd $srcdir; $valgrind $vjs $pcre2grep -L -r --include=grepinput --exclude 'grepinput$' --exclude=g…
260 echo "---------------------------- Test 37 -----------------------------" >>testtrygrep
261 (cd $srcdir; $valgrind $vjs $pcre2grep '^(a+)*\d' ./testdata/grepinput) >>testtrygrep 2>teststderr…
266 echo "---------------------------- Test 38 ------------------------------" >>testtrygrep
267 (cd $srcdir; $valgrind $vjs $pcre2grep '>\x00<' ./testdata/grepinput) >>testtrygrep
270 echo "---------------------------- Test 39 ------------------------------" >>testtrygrep
271 (cd $srcdir; $valgrind $vjs $pcre2grep -A1 'before the binary zero' ./testdata/grepinput) >>testtry…
274 echo "---------------------------- Test 40 ------------------------------" >>testtrygrep
275 (cd $srcdir; $valgrind $vjs $pcre2grep -B1 'after the binary zero' ./testdata/grepinput) >>testtryg…
278 echo "---------------------------- Test 41 ------------------------------" >>testtrygrep
279 (cd $srcdir; $valgrind $vjs $pcre2grep -B1 -o '\w+ the binary zero' ./testdata/grepinput) >>testtry…
282 echo "---------------------------- Test 42 ------------------------------" >>testtrygrep
283 (cd $srcdir; $valgrind $vjs $pcre2grep -B1 -onH '\w+ the binary zero' ./testdata/grepinput) >>testt…
286 echo "---------------------------- Test 43 ------------------------------" >>testtrygrep
287 (cd $srcdir; $valgrind $vjs $pcre2grep -on 'before|zero|after' ./testdata/grepinput) >>testtrygrep
290 echo "---------------------------- Test 44 ------------------------------" >>testtrygrep
291 (cd $srcdir; $valgrind $vjs $pcre2grep -on -e before -ezero -e after ./testdata/grepinput) >>testtr…
294 echo "---------------------------- Test 45 ------------------------------" >>testtrygrep
295 (cd $srcdir; $valgrind $vjs $pcre2grep -on -f ./testdata/greplist -e binary ./testdata/grepinput) >…
298 echo "---------------------------- Test 46 ------------------------------" >>testtrygrep
299 (cd $srcdir; $valgrind $vjs $pcre2grep -eabc -e '(unclosed' ./testdata/grepinput) >>testtrygrep 2>&1
302 echo "---------------------------- Test 47 ------------------------------" >>testtrygrep
303 (cd $srcdir; $valgrind $vjs $pcre2grep -Fx "AB.VE
307 echo "---------------------------- Test 48 ------------------------------" >>testtrygrep
308 (cd $srcdir; $valgrind $vjs $pcre2grep -F "AB.VE
312 echo "---------------------------- Test 49 ------------------------------" >>testtrygrep
313 (cd $srcdir; $valgrind $vjs $pcre2grep -F -e DATA -e "AB.VE
317 echo "---------------------------- Test 50 ------------------------------" >>testtrygrep
318 (cd $srcdir; $valgrind $vjs $pcre2grep "^(abc|def|ghi|jkl)" ./testdata/grepinputx) >>testtrygrep
321 echo "---------------------------- Test 51 ------------------------------" >>testtrygrep
322 (cd $srcdir; $valgrind $vjs $pcre2grep -Mv "brown\sfox" ./testdata/grepinputv) >>testtrygrep
325 echo "---------------------------- Test 52 ------------------------------" >>testtrygrep
326 (cd $srcdir; $valgrind $vjs $pcre2grep --colour=always jumps ./testdata/grepinputv) >>testtrygrep
329 echo "---------------------------- Test 53 ------------------------------" >>testtrygrep
330 (cd $srcdir; $valgrind $vjs $pcre2grep --file-offsets 'before|zero|after' ./testdata/grepinput) >>t…
333 echo "---------------------------- Test 54 ------------------------------" >>testtrygrep
334 (cd $srcdir; $valgrind $vjs $pcre2grep --line-offsets 'before|zero|after' ./testdata/grepinput) >>t…
337 echo "---------------------------- Test 55 -----------------------------" >>testtrygrep
338 (cd $srcdir; $valgrind $vjs $pcre2grep -f./testdata/greplist --color=always ./testdata/grepinputx) …
341 echo "---------------------------- Test 56 -----------------------------" >>testtrygrep
342 (cd $srcdir; $valgrind $vjs $pcre2grep -c lazy ./testdata/grepinput*) >>testtrygrep
345 echo "---------------------------- Test 57 -----------------------------" >>testtrygrep
346 (cd $srcdir; $valgrind $vjs $pcre2grep -c -l lazy ./testdata/grepinput*) >>testtrygrep
349 echo "---------------------------- Test 58 -----------------------------" >>testtrygrep
350 (cd $srcdir; $valgrind $vjs $pcre2grep --regex=PATTERN ./testdata/grepinput) >>testtrygrep
353 echo "---------------------------- Test 59 -----------------------------" >>testtrygrep
354 (cd $srcdir; $valgrind $vjs $pcre2grep --regexp=PATTERN ./testdata/grepinput) >>testtrygrep
357 echo "---------------------------- Test 60 -----------------------------" >>testtrygrep
358 (cd $srcdir; $valgrind $vjs $pcre2grep --regex PATTERN ./testdata/grepinput) >>testtrygrep
361 echo "---------------------------- Test 61 -----------------------------" >>testtrygrep
362 (cd $srcdir; $valgrind $vjs $pcre2grep --regexp PATTERN ./testdata/grepinput) >>testtrygrep
365 echo "---------------------------- Test 62 -----------------------------" >>testtrygrep
366 (cd $srcdir; $valgrind $pcre2grep --match-limit=1000 --no-jit -M 'This is a file(.|\R)*file.' ./tes…
369 echo "---------------------------- Test 63 -----------------------------" >>testtrygrep
370 (cd $srcdir; $valgrind $pcre2grep --recursion-limit=1000 --no-jit -M 'This is a file(.|\R)*file.' .…
373 echo "---------------------------- Test 64 ------------------------------" >>testtrygrep
374 (cd $srcdir; $valgrind $vjs $pcre2grep -o1 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testt…
377 echo "---------------------------- Test 65 ------------------------------" >>testtrygrep
378 (cd $srcdir; $valgrind $vjs $pcre2grep -o2 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testt…
381 echo "---------------------------- Test 66 ------------------------------" >>testtrygrep
382 (cd $srcdir; $valgrind $vjs $pcre2grep -o3 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testt…
385 echo "---------------------------- Test 67 ------------------------------" >>testtrygrep
386 (cd $srcdir; $valgrind $vjs $pcre2grep -o12 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>test…
389 echo "---------------------------- Test 68 ------------------------------" >>testtrygrep
390 (cd $srcdir; $valgrind $vjs $pcre2grep --only-matching=2 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grep…
393 echo "---------------------------- Test 69 -----------------------------" >>testtrygrep
394 (cd $srcdir; $valgrind $vjs $pcre2grep -vn --colour=always pattern ./testdata/grepinputx) >>testtry…
397 echo "---------------------------- Test 70 -----------------------------" >>testtrygrep
398 (cd $srcdir; $valgrind $vjs $pcre2grep --color=always -M "triple:\t.*\n\n" ./testdata/grepinput3) >…
400 (cd $srcdir; $valgrind $vjs $pcre2grep --color=always -M -n "triple:\t.*\n\n" ./testdata/grepinput3…
402 (cd $srcdir; $valgrind $vjs $pcre2grep -M "triple:\t.*\n\n" ./testdata/grepinput3) >>testtrygrep
404 (cd $srcdir; $valgrind $vjs $pcre2grep -M -n "triple:\t.*\n\n" ./testdata/grepinput3) >>testtrygrep
407 echo "---------------------------- Test 71 -----------------------------" >>testtrygrep
408 (cd $srcdir; $valgrind $vjs $pcre2grep -o "^01|^02|^03" ./testdata/grepinput) >>testtrygrep
411 echo "---------------------------- Test 72 -----------------------------" >>testtrygrep
412 (cd $srcdir; $valgrind $vjs $pcre2grep --color=always "^01|^02|^03" ./testdata/grepinput) >>testtry…
415 echo "---------------------------- Test 73 -----------------------------" >>testtrygrep
416 (cd $srcdir; $valgrind $vjs $pcre2grep -o --colour=always "^01|^02|^03" ./testdata/grepinput) >>tes…
419 echo "---------------------------- Test 74 -----------------------------" >>testtrygrep
420 (cd $srcdir; $valgrind $vjs $pcre2grep -o "^01|02|^03" ./testdata/grepinput) >>testtrygrep
423 echo "---------------------------- Test 75 -----------------------------" >>testtrygrep
424 (cd $srcdir; $valgrind $vjs $pcre2grep --color=always "^01|02|^03" ./testdata/grepinput) >>testtryg…
427 echo "---------------------------- Test 76 -----------------------------" >>testtrygrep
428 (cd $srcdir; $valgrind $vjs $pcre2grep -o --colour=always "^01|02|^03" ./testdata/grepinput) >>test…
431 echo "---------------------------- Test 77 -----------------------------" >>testtrygrep
432 (cd $srcdir; $valgrind $vjs $pcre2grep -o "^01|^02|03" ./testdata/grepinput) >>testtrygrep
435 echo "---------------------------- Test 78 -----------------------------" >>testtrygrep
436 (cd $srcdir; $valgrind $vjs $pcre2grep --color=always "^01|^02|03" ./testdata/grepinput) >>testtryg…
439 echo "---------------------------- Test 79 -----------------------------" >>testtrygrep
440 (cd $srcdir; $valgrind $vjs $pcre2grep -o --colour=always "^01|^02|03" ./testdata/grepinput) >>test…
443 echo "---------------------------- Test 80 -----------------------------" >>testtrygrep
444 (cd $srcdir; $valgrind $vjs $pcre2grep -o "\b01|\b02" ./testdata/grepinput) >>testtrygrep
447 echo "---------------------------- Test 81 -----------------------------" >>testtrygrep
448 (cd $srcdir; $valgrind $vjs $pcre2grep --color=always "\\b01|\\b02" ./testdata/grepinput) >>testtry…
451 echo "---------------------------- Test 82 -----------------------------" >>testtrygrep
452 (cd $srcdir; $valgrind $vjs $pcre2grep -o --colour=always "\\b01|\\b02" ./testdata/grepinput) >>tes…
455 echo "---------------------------- Test 83 -----------------------------" >>testtrygrep
456 (cd $srcdir; $valgrind $vjs $pcre2grep --buffer-size=10 --max-buffer-size=100 "^a" ./testdata/grepi…
459 echo "---------------------------- Test 84 -----------------------------" >>testtrygrep
461 (cd $srcdir; $valgrind $vjs $pcre2grep --file-list ./testdata/grepfilelist --file-list $builddir/te…
464 echo "---------------------------- Test 85 -----------------------------" >>testtrygrep
465 (cd $srcdir; $valgrind $vjs $pcre2grep --file-list=./testdata/grepfilelist "dolor" ./testdata/grepi…
468 echo "---------------------------- Test 86 -----------------------------" >>testtrygrep
469 (cd $srcdir; $valgrind $vjs $pcre2grep "dog" ./testdata/grepbinary) >>testtrygrep 2>&1
472 echo "---------------------------- Test 87 -----------------------------" >>testtrygrep
473 (cd $srcdir; $valgrind $vjs $pcre2grep "cat" ./testdata/grepbinary) >>testtrygrep 2>&1
476 echo "---------------------------- Test 88 -----------------------------" >>testtrygrep
477 (cd $srcdir; $valgrind $vjs $pcre2grep -v "cat" ./testdata/grepbinary) >>testtrygrep 2>&1
480 echo "---------------------------- Test 89 -----------------------------" >>testtrygrep
481 (cd $srcdir; $valgrind $vjs $pcre2grep -I "dog" ./testdata/grepbinary) >>testtrygrep 2>&1
484 echo "---------------------------- Test 90 -----------------------------" >>testtrygrep
485 (cd $srcdir; $valgrind $vjs $pcre2grep --binary-files=without-match "dog" ./testdata/grepbinary) >>…
488 echo "---------------------------- Test 91 -----------------------------" >>testtrygrep
489 (cd $srcdir; $valgrind $vjs $pcre2grep -a "dog" ./testdata/grepbinary) >>testtrygrep 2>&1
492 echo "---------------------------- Test 92 -----------------------------" >>testtrygrep
493 (cd $srcdir; $valgrind $vjs $pcre2grep --binary-files=text "dog" ./testdata/grepbinary) >>testtrygr…
496 echo "---------------------------- Test 93 -----------------------------" >>testtrygrep
497 (cd $srcdir; $valgrind $vjs $pcre2grep --text "dog" ./testdata/grepbinary) >>testtrygrep 2>&1
500 echo "---------------------------- Test 94 -----------------------------" >>testtrygrep
501 (cd $srcdir; $valgrind $vjs $pcre2grep -L -r --include=grepinputx --include grepinput8 'fox' ./test…
504 echo "---------------------------- Test 95 -----------------------------" >>testtrygrep
505 (cd $srcdir; $valgrind $vjs $pcre2grep --file-list ./testdata/grepfilelist --exclude grepinputv "fo…
508 echo "---------------------------- Test 96 -----------------------------" >>testtrygrep
509 (cd $srcdir; $valgrind $vjs $pcre2grep -L -r --include-dir=testdata --exclude '^(?!grepinput)' --ex…
512 echo "---------------------------- Test 97 -----------------------------" >>testtrygrep
515 (cd $srcdir; $valgrind $vjs $pcre2grep -L -r --include=grepinput --exclude=grepinputM --exclude-fro…
518 echo "---------------------------- Test 98 -----------------------------" >>testtrygrep
521 …ir; $valgrind $vjs $pcre2grep -L -r --exclude=grepinput3 --exclude=grepinputM --include=grepinput
524 echo "---------------------------- Test 99 -----------------------------" >>testtrygrep
527valgrind $vjs $pcre2grep -L -r --include grepinput --exclude=grepinputM --exclude-from $builddir/t…
530 echo "---------------------------- Test 100 ------------------------------" >>testtrygrep
531 (cd $srcdir; $valgrind $vjs $pcre2grep -Ho2 --only-matching=1 -o3 '(\w+) binary (\w+)(\.)?' ./testd…
534 echo "---------------------------- Test 101 ------------------------------" >>testtrygrep
535 (cd $srcdir; $valgrind $vjs $pcre2grep -o3 -Ho2 -o12 --only-matching=1 -o3 --colour=always --om-sep…
538 echo "---------------------------- Test 102 -----------------------------" >>testtrygrep
539 (cd $srcdir; $valgrind $vjs $pcre2grep -n "^$" ./testdata/grepinput3) >>testtrygrep 2>&1
542 echo "---------------------------- Test 103 -----------------------------" >>testtrygrep
543 (cd $srcdir; $valgrind $vjs $pcre2grep --only-matching "^$" ./testdata/grepinput3) >>testtrygrep 2>…
546 echo "---------------------------- Test 104 -----------------------------" >>testtrygrep
547 (cd $srcdir; $valgrind $vjs $pcre2grep -n --only-matching "^$" ./testdata/grepinput3) >>testtrygrep…
550 echo "---------------------------- Test 105 -----------------------------" >>testtrygrep
551 (cd $srcdir; $valgrind $vjs $pcre2grep --colour=always "ipsum|" ./testdata/grepinput3) >>testtrygre…
554 echo "---------------------------- Test 106 -----------------------------" >>testtrygrep
555 (cd $srcdir; echo "a" | $valgrind $vjs $pcre2grep -M "|a" ) >>testtrygrep 2>&1
558 echo "---------------------------- Test 107 -----------------------------" >>testtrygrep
561 (cd $srcdir; $valgrind $vjs $pcre2grep --line-offsets '(?<=\Ka)' $builddir/testtemp1grep) >>testtr…
564 echo "---------------------------- Test 108 ------------------------------" >>testtrygrep
565 (cd $srcdir; $valgrind $vjs $pcre2grep -lq PATTERN ./testdata/grepinput ./testdata/grepinputx) >>te…
568 echo "---------------------------- Test 109 -----------------------------" >>testtrygrep
569 (cd $srcdir; $valgrind $vjs $pcre2grep -cq lazy ./testdata/grepinput*) >>testtrygrep
572 echo "---------------------------- Test 110 -----------------------------" >>testtrygrep
573 (cd $srcdir; $valgrind $vjs $pcre2grep --om-separator / -Mo0 -o1 -o2 'match (\d+):\n (.)\n' testdat…
576 echo "---------------------------- Test 111 -----------------------------" >>testtrygrep
577 (cd $srcdir; $valgrind $vjs $pcre2grep --line-offsets -M 'match (\d+):\n (.)\n' testdata/grepinput)…
580 echo "---------------------------- Test 112 -----------------------------" >>testtrygrep
581 (cd $srcdir; $valgrind $vjs $pcre2grep --file-offsets -M 'match (\d+):\n (.)\n' testdata/grepinput)…
584 echo "---------------------------- Test 113 -----------------------------" >>testtrygrep
585 (cd $srcdir; $valgrind $vjs $pcre2grep --total-count 'the' testdata/grepinput*) >>testtrygrep
588 echo "---------------------------- Test 114 -----------------------------" >>testtrygrep
589 (cd $srcdir; $valgrind $vjs $pcre2grep -tc 'the' testdata/grepinput*) >>testtrygrep
592 echo "---------------------------- Test 115 -----------------------------" >>testtrygrep
593 (cd $srcdir; $valgrind $vjs $pcre2grep -tlc 'the' testdata/grepinput*) >>testtrygrep
596 echo "---------------------------- Test 116 -----------------------------" >>testtrygrep
597 (cd $srcdir; $valgrind $vjs $pcre2grep --exclude=grepinputM -th 'the' testdata/grepinput*) >>testtr…
600 echo "---------------------------- Test 117 -----------------------------" >>testtrygrep
601 (cd $srcdir; $valgrind $vjs $pcre2grep -tch 'the' testdata/grepinput*) >>testtrygrep
604 echo "---------------------------- Test 118 -----------------------------" >>testtrygrep
605 (cd $srcdir; $valgrind $vjs $pcre2grep -tL 'the' testdata/grepinput*) >>testtrygrep
608 echo "---------------------------- Test 119 -----------------------------" >>testtrygrep
609 printf '123\n456\n789\n---abc\ndef\nxyz\n---\n' >testNinputgrep
610 $valgrind $vjs $pcre2grep -Mo '(\n|[^-])*---' testNinputgrep >>testtrygrep
613 echo "---------------------------- Test 120 ------------------------------" >>testtrygrep
614 (cd $srcdir; $valgrind $vjs $pcre2grep -HO '$0:$2$1$3' '(\w+) binary (\w+)(\.)?' ./testdata/grepinp…
617 echo "---------------------------- Test 121 -----------------------------" >>testtrygrep
618 (cd $srcdir; $valgrind $vjs $pcre2grep -F '\E and (regex)' testdata/grepinputv) >>testtrygrep
621 echo "---------------------------- Test 122 -----------------------------" >>testtrygrep
622 (cd $srcdir; $valgrind $vjs $pcre2grep -w 'cat|dog' testdata/grepinputv) >>testtrygrep
625 echo "---------------------------- Test 123 -----------------------------" >>testtrygrep
626 (cd $srcdir; $valgrind $vjs $pcre2grep -w 'dog|cat' testdata/grepinputv) >>testtrygrep
629 echo "---------------------------- Test 124 -----------------------------" >>testtrygrep
630 (cd $srcdir; $valgrind $vjs $pcre2grep -Mn --colour=always 'start[\s]+end' testdata/grepinputM) >>t…
632 (cd $srcdir; $valgrind $vjs $pcre2grep -Mn --colour=always -A2 'start[\s]+end' testdata/grepinputM)…
634 (cd $srcdir; $valgrind $vjs $pcre2grep -Mn 'start[\s]+end' testdata/grepinputM) >>testtrygrep
636 (cd $srcdir; $valgrind $vjs $pcre2grep -Mn -A2 'start[\s]+end' testdata/grepinputM) >>testtrygrep
639 echo "---------------------------- Test 125 -----------------------------" >>testtrygrep
641 $valgrind $vjs $pcre2grep --colour=always '(?<=\K.)' testNinputgrep >>testtrygrep
643 $valgrind $vjs $pcre2grep --colour=always '(?=.\K)' testNinputgrep >>testtrygrep
645 $valgrind $vjs $pcre2grep --colour=always '(?<=\K[ac])' testNinputgrep >>testtrygrep
647 $valgrind $vjs $pcre2grep --colour=always '(?=[ac]\K)' testNinputgrep >>testtrygrep
650 echo "---------------------------- Test 126 -----------------------------" >>testtrygrep
653 $valgrind $vjs $pcre2grep -a -f testtemp1grep testtemp2grep >>testtrygrep
656 echo "---------------------------- Test 127 -----------------------------" >>testtrygrep
657 (cd $srcdir; $valgrind $vjs $pcre2grep -o --om-capture=0 'pattern()()()()' testdata/grepinput) >>te…
660 echo "---------------------------- Test 128 -----------------------------" >>testtrygrep
661 (cd $srcdir; $valgrind $vjs $pcre2grep -o1 --om-capture=0 'pattern()()()()' testdata/grepinput) >>t…
664 echo "---------------------------- Test 129 -----------------------------" >>testtrygrep
665 (cd $srcdir; $valgrind $vjs $pcre2grep -m 2 'fox' testdata/grepinput) >>testtrygrep 2>&1
668 echo "---------------------------- Test 130 -----------------------------" >>testtrygrep
669 (cd $srcdir; $valgrind $vjs $pcre2grep -o -m2 'fox' testdata/grepinput) >>testtrygrep 2>&1
672 echo "---------------------------- Test 131 -----------------------------" >>testtrygrep
673 (cd $srcdir; $valgrind $vjs $pcre2grep -oc -m2 'fox' testdata/grepinput) >>testtrygrep 2>&1
676 echo "---------------------------- Test 132 -----------------------------" >>testtrygrep
677 (cd $srcdir; $valgrind $vjs $pcre2grep -m1 -A3 '^match'; echo '---'; head -1) <$srcdir/testdata/gre…
680 echo "---------------------------- Test 133 -----------------------------" >>testtrygrep
681 (cd $srcdir; $valgrind $vjs $pcre2grep -m1 -O '=$x{41}$x423$o{103}$o1045=' 'fox') <$srcdir/testdata…
690 # These tests require UTF-8 support
692 if [ $utf8 -ne 0 ] ; then
693 echo "Testing pcre2grep UTF-8 features"
695 echo "---------------------------- Test U1 ------------------------------" >testtrygrep
696 …(cd $srcdir; $valgrind $vjs $pcre2grep -n -u --newline=any "^X" ./testdata/grepinput8) >>testtrygr…
699 echo "---------------------------- Test U2 ------------------------------" >>testtrygrep
700 …(cd $srcdir; $valgrind $vjs $pcre2grep -n -u -C 3 --newline=any "Match" ./testdata/grepinput8) >>t…
703 echo "---------------------------- Test U3 ------------------------------" >>testtrygrep
704 …(cd $srcdir; $valgrind $vjs $pcre2grep --line-offsets -u --newline=any '(?<=\K\x{17f})' ./testdata…
707 echo "---------------------------- Test U4 ------------------------------" >>testtrygrep
709 (cd $srcdir; $valgrind $vjs $pcre2grep -u -o '....' $builddir/testtemp1grep) >>testtrygrep 2>&1
712 echo "---------------------------- Test U5 ------------------------------" >>testtrygrep
714 (cd $srcdir; $valgrind $vjs $pcre2grep -U -o '....' $builddir/testtemp1grep) >>testtrygrep
717 echo "---------------------------- Test U6 -----------------------------" >>testtrygrep
718 …(cd $srcdir; $valgrind $vjs $pcre2grep -u -m1 -O '=$x{1d3}$o{744}=' 'fox') <$srcdir/testdata/grepi…
725 echo "Skipping pcre2grep UTF-8 tests: no UTF-8 support in PCRE2 library"
739 printf '%c--------------------------- Test N1 ------------------------------\r\n' - >testtrygrep
740 $valgrind $vjs $pcre2grep -n -N CR "^(abc|def|ghi|jkl)" testNinputgrep >>testtrygrep
742 printf '%c--------------------------- Test N2 ------------------------------\r\n' - >>testtrygrep
743 $valgrind $vjs $pcre2grep -n --newline=crlf "^(abc|def|ghi|jkl)" testNinputgrep >>testtrygrep
745 printf '%c--------------------------- Test N3 ------------------------------\r\n' - >>testtrygrep
747 $valgrind $vjs $pcre2grep -n --newline=cr -F "$pattern" testNinputgrep >>testtrygrep
749 printf '%c--------------------------- Test N4 ------------------------------\r\n' - >>testtrygrep
750 $valgrind $vjs $pcre2grep -n --newline=crlf -F -f $srcdir/testdata/greppatN4 testNinputgrep >>testt…
752 printf '%c--------------------------- Test N5 ------------------------------\r\n' - >>testtrygrep
753 $valgrind $vjs $pcre2grep -n --newline=any "^(abc|def|ghi|jkl)" testNinputgrep >>testtrygrep
755 printf '%c--------------------------- Test N6 ------------------------------\r\n' - >>testtrygrep
756 $valgrind $vjs $pcre2grep -n --newline=anycrlf "^(abc|def|ghi|jkl)" testNinputgrep >>testtrygrep
765 printf '%c--------------------------- Test N7 ------------------------------\r\n' - >>testtrygrep
769 …$valgrind $vjs $pcre2grep -na --newline=nul "^(abc|def)" testNinputgrep | sed 's/\x00/ZERO/g' >>te…
779 # to restrict these callouts to the non-fork case, either for security, or for
783 if $valgrind $vjs $pcre2grep --help | $valgrind $vjs $pcre2grep -q 'callout scripts in patterns are…
785 …$valgrind $vjs $pcre2grep '(T)(..(.))(?C"/bin/echo|Arg1: [$1] [$2] [$3]|Arg2: $|${1}$| ($4) ($14) …
786 …$valgrind $vjs $pcre2grep '(T)(..(.))()()()()()()()(..)(?C"/bin/echo|Arg1: [$11] [${11}]")' $srcdi…
787 $valgrind $vjs $pcre2grep '(T)(?C"|$0:$1$n")' $srcdir/testdata/grepinputv >>testtrygrep
788 $valgrind $vjs $pcre2grep '(T)(?C"|$1$n")(*F)' $srcdir/testdata/grepinputv >>testtrygrep
789 …$valgrind $vjs $pcre2grep -m1 '(T)(?C"|$0:$1:$x{41}$o{101}$n")' $srcdir/testdata/grepinputv >>test…
791 …if $valgrind $vjs $pcre2grep --help | $valgrind $vjs $pcre2grep -q 'Non-fork callout scripts in pa…
808 checkspecial '-xxxxx' 2
809 checkspecial '--help' 0
810 checkspecial '--line-buffered --colour=auto abc /dev/null' 1
813 rm -f testNinputgrep teststderrgrep testtrygrep testtemp1grep testtemp2grep