blob: b0595d8ccf4158493e06ecf96964a828a9381e20 [file] [log] [blame]
Tristan Matthews04616462013-11-14 16:09:34 -05001#! /bin/sh
2
3# Run pcregrep tests. The assumption is that the PCRE tests check the library
4# itself. What we are checking here is the file handling and options that are
5# supported by pcregrep.
6
7# Set the C locale, so that sort(1) behaves predictably.
8
9LC_ALL=C
10export LC_ALL
11
12# Remove any non-default colouring that the caller may have set.
13
14unset PCREGREP_COLOUR PCREGREP_COLOR
15
16# Set the program to be tested, and valgrind settings when requested.
17
18pcregrep=`pwd`/pcregrep
19
20valgrind=
21while [ $# -gt 0 ] ; do
22 case $1 in
23 valgrind) valgrind="valgrind -q --leak-check=no --smc-check=all";;
24 *) echo "RunGrepTest: Unknown argument $1"; exit 1;;
25 esac
26 shift
27done
28
29echo " "
30if [ "$valgrind" = "" ] ; then
31 echo "Testing pcregrep"
32else
33 echo "Testing pcregrep using valgrind"
34fi
35
36$pcregrep -V
37
38# Set up a suitable "diff" command for comparison. Some systems have a diff
39# that lacks a -u option. Try to deal with this; better do the test for the -b
40# option as well.
41
42cf="diff -ub"
43if diff -u /dev/null /dev/null; then
44 if diff -ub /dev/null /dev/null; then cf="diff -ub"; else cf="diff -u"; fi
45else
46 if diff -b /dev/null /dev/null; then cf="diff -b"; else cf="diff"; fi
47fi
48
49# If PCRE has been built in a directory other than the source directory, and
50# this test is being run from "make check" as usual, then $srcdir will be
51# set. If not, set it to the current or parent directory, whichever one
52# contains the test data. We then arrange to run the pcregrep command in the
53# source directory so that the file names that appear in the output are always
54# the same.
55
56if [ -z "$srcdir" -o ! -d "$srcdir/testdata" ] ; then
57 if [ -d "./testdata" ] ; then
58 srcdir=.
59 elif [ -d "../testdata" ] ; then
60 srcdir=..
61 else
62 echo "Cannot find the testdata directory"
63 exit 1
64 fi
65fi
66
67# Check for the availability of UTF-8 support
68
69./pcretest -C | ./pcregrep "No UTF-8 support" >/dev/null
70utf8=$?
71
72echo "---------------------------- Test 1 ------------------------------" >testtry
73(cd $srcdir; $valgrind $pcregrep PATTERN ./testdata/grepinput) >>testtry
74echo "RC=$?" >>testtry
75
76echo "---------------------------- Test 2 ------------------------------" >>testtry
77(cd $srcdir; $valgrind $pcregrep '^PATTERN' ./testdata/grepinput) >>testtry
78echo "RC=$?" >>testtry
79
80echo "---------------------------- Test 3 ------------------------------" >>testtry
81(cd $srcdir; $valgrind $pcregrep -in PATTERN ./testdata/grepinput) >>testtry
82echo "RC=$?" >>testtry
83
84echo "---------------------------- Test 4 ------------------------------" >>testtry
85(cd $srcdir; $valgrind $pcregrep -ic PATTERN ./testdata/grepinput) >>testtry
86echo "RC=$?" >>testtry
87
88echo "---------------------------- Test 5 ------------------------------" >>testtry
89(cd $srcdir; $valgrind $pcregrep -in PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
90echo "RC=$?" >>testtry
91
92echo "---------------------------- Test 6 ------------------------------" >>testtry
93(cd $srcdir; $valgrind $pcregrep -inh PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
94echo "RC=$?" >>testtry
95
96echo "---------------------------- Test 7 ------------------------------" >>testtry
97(cd $srcdir; $valgrind $pcregrep -il PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
98echo "RC=$?" >>testtry
99
100echo "---------------------------- Test 8 ------------------------------" >>testtry
101(cd $srcdir; $valgrind $pcregrep -l PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
102echo "RC=$?" >>testtry
103
104echo "---------------------------- Test 9 ------------------------------" >>testtry
105(cd $srcdir; $valgrind $pcregrep -q PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
106echo "RC=$?" >>testtry
107
108echo "---------------------------- Test 10 -----------------------------" >>testtry
109(cd $srcdir; $valgrind $pcregrep -q NEVER-PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
110echo "RC=$?" >>testtry
111
112echo "---------------------------- Test 11 -----------------------------" >>testtry
113(cd $srcdir; $valgrind $pcregrep -vn pattern ./testdata/grepinputx) >>testtry
114echo "RC=$?" >>testtry
115
116echo "---------------------------- Test 12 -----------------------------" >>testtry
117(cd $srcdir; $valgrind $pcregrep -ix pattern ./testdata/grepinputx) >>testtry
118echo "RC=$?" >>testtry
119
120echo "---------------------------- Test 13 -----------------------------" >>testtry
121(cd $srcdir; $valgrind $pcregrep -f./testdata/greplist ./testdata/grepinputx) >>testtry
122echo "RC=$?" >>testtry
123
124echo "---------------------------- Test 14 -----------------------------" >>testtry
125(cd $srcdir; $valgrind $pcregrep -w pat ./testdata/grepinput ./testdata/grepinputx) >>testtry
126echo "RC=$?" >>testtry
127
128echo "---------------------------- Test 15 -----------------------------" >>testtry
129(cd $srcdir; $valgrind $pcregrep 'abc^*' ./testdata/grepinput) 2>>testtry >>testtry
130echo "RC=$?" >>testtry
131
132echo "---------------------------- Test 16 -----------------------------" >>testtry
133(cd $srcdir; $valgrind $pcregrep abc ./testdata/grepinput ./testdata/nonexistfile) 2>>testtry >>testtry
134echo "RC=$?" >>testtry
135
136echo "---------------------------- Test 17 -----------------------------" >>testtry
137(cd $srcdir; $valgrind $pcregrep -M 'the\noutput' ./testdata/grepinput) >>testtry
138echo "RC=$?" >>testtry
139
140echo "---------------------------- Test 18 -----------------------------" >>testtry
141(cd $srcdir; $valgrind $pcregrep -Mn '(the\noutput|dog\.\n--)' ./testdata/grepinput) >>testtry
142echo "RC=$?" >>testtry
143
144echo "---------------------------- Test 19 -----------------------------" >>testtry
145(cd $srcdir; $valgrind $pcregrep -Mix 'Pattern' ./testdata/grepinputx) >>testtry
146echo "RC=$?" >>testtry
147
148echo "---------------------------- Test 20 -----------------------------" >>testtry
149(cd $srcdir; $valgrind $pcregrep -Mixn 'complete pair\nof lines' ./testdata/grepinputx) >>testtry
150echo "RC=$?" >>testtry
151
152echo "---------------------------- Test 21 -----------------------------" >>testtry
153(cd $srcdir; $valgrind $pcregrep -nA3 'four' ./testdata/grepinputx) >>testtry
154echo "RC=$?" >>testtry
155
156echo "---------------------------- Test 22 -----------------------------" >>testtry
157(cd $srcdir; $valgrind $pcregrep -nB3 'four' ./testdata/grepinputx) >>testtry
158echo "RC=$?" >>testtry
159
160echo "---------------------------- Test 23 -----------------------------" >>testtry
161(cd $srcdir; $valgrind $pcregrep -C3 'four' ./testdata/grepinputx) >>testtry
162echo "RC=$?" >>testtry
163
164echo "---------------------------- Test 24 -----------------------------" >>testtry
165(cd $srcdir; $valgrind $pcregrep -A9 'four' ./testdata/grepinputx) >>testtry
166echo "RC=$?" >>testtry
167
168echo "---------------------------- Test 25 -----------------------------" >>testtry
169(cd $srcdir; $valgrind $pcregrep -nB9 'four' ./testdata/grepinputx) >>testtry
170echo "RC=$?" >>testtry
171
172echo "---------------------------- Test 26 -----------------------------" >>testtry
173(cd $srcdir; $valgrind $pcregrep -A9 -B9 'four' ./testdata/grepinputx) >>testtry
174echo "RC=$?" >>testtry
175
176echo "---------------------------- Test 27 -----------------------------" >>testtry
177(cd $srcdir; $valgrind $pcregrep -A10 'four' ./testdata/grepinputx) >>testtry
178echo "RC=$?" >>testtry
179
180echo "---------------------------- Test 28 -----------------------------" >>testtry
181(cd $srcdir; $valgrind $pcregrep -nB10 'four' ./testdata/grepinputx) >>testtry
182echo "RC=$?" >>testtry
183
184echo "---------------------------- Test 29 -----------------------------" >>testtry
185(cd $srcdir; $valgrind $pcregrep -C12 -B10 'four' ./testdata/grepinputx) >>testtry
186echo "RC=$?" >>testtry
187
188echo "---------------------------- Test 30 -----------------------------" >>testtry
189(cd $srcdir; $valgrind $pcregrep -inB3 'pattern' ./testdata/grepinput ./testdata/grepinputx) >>testtry
190echo "RC=$?" >>testtry
191
192echo "---------------------------- Test 31 -----------------------------" >>testtry
193(cd $srcdir; $valgrind $pcregrep -inA3 'pattern' ./testdata/grepinput ./testdata/grepinputx) >>testtry
194echo "RC=$?" >>testtry
195
196echo "---------------------------- Test 32 -----------------------------" >>testtry
197(cd $srcdir; $valgrind $pcregrep -L 'fox' ./testdata/grepinput ./testdata/grepinputx) >>testtry
198echo "RC=$?" >>testtry
199
200echo "---------------------------- Test 33 -----------------------------" >>testtry
201(cd $srcdir; $valgrind $pcregrep 'fox' ./testdata/grepnonexist) >>testtry 2>&1
202echo "RC=$?" >>testtry
203
204echo "---------------------------- Test 34 -----------------------------" >>testtry
205(cd $srcdir; $valgrind $pcregrep -s 'fox' ./testdata/grepnonexist) >>testtry 2>&1
206echo "RC=$?" >>testtry
207
208echo "---------------------------- Test 35 -----------------------------" >>testtry
209(cd $srcdir; $valgrind $pcregrep -L -r --include=grepinputx --exclude-dir='^\.' 'fox' ./testdata) >>testtry
210echo "RC=$?" >>testtry
211
212echo "---------------------------- Test 36 -----------------------------" >>testtry
213(cd $srcdir; $valgrind $pcregrep -L -r --include=grepinput --exclude 'grepinput$' --exclude_dir='^\.' 'fox' ./testdata | sort) >>testtry
214echo "RC=$?" >>testtry
215
216echo "---------------------------- Test 37 -----------------------------" >>testtry
217(cd $srcdir; $valgrind $pcregrep '^(a+)*\d' ./testdata/grepinput) >>testtry 2>teststderr
218echo "RC=$?" >>testtry
219echo "======== STDERR ========" >>testtry
220cat teststderr >>testtry
221
222echo "---------------------------- Test 38 ------------------------------" >>testtry
223(cd $srcdir; $valgrind $pcregrep '>\x00<' ./testdata/grepinput) >>testtry
224echo "RC=$?" >>testtry
225
226echo "---------------------------- Test 39 ------------------------------" >>testtry
227(cd $srcdir; $valgrind $pcregrep -A1 'before the binary zero' ./testdata/grepinput) >>testtry
228echo "RC=$?" >>testtry
229
230echo "---------------------------- Test 40 ------------------------------" >>testtry
231(cd $srcdir; $valgrind $pcregrep -B1 'after the binary zero' ./testdata/grepinput) >>testtry
232echo "RC=$?" >>testtry
233
234echo "---------------------------- Test 41 ------------------------------" >>testtry
235(cd $srcdir; $valgrind $pcregrep -B1 -o '\w+ the binary zero' ./testdata/grepinput) >>testtry
236echo "RC=$?" >>testtry
237
238echo "---------------------------- Test 42 ------------------------------" >>testtry
239(cd $srcdir; $valgrind $pcregrep -B1 -onH '\w+ the binary zero' ./testdata/grepinput) >>testtry
240echo "RC=$?" >>testtry
241
242echo "---------------------------- Test 43 ------------------------------" >>testtry
243(cd $srcdir; $valgrind $pcregrep -on 'before|zero|after' ./testdata/grepinput) >>testtry
244echo "RC=$?" >>testtry
245
246echo "---------------------------- Test 44 ------------------------------" >>testtry
247(cd $srcdir; $valgrind $pcregrep -on -e before -ezero -e after ./testdata/grepinput) >>testtry
248echo "RC=$?" >>testtry
249
250echo "---------------------------- Test 45 ------------------------------" >>testtry
251(cd $srcdir; $valgrind $pcregrep -on -f ./testdata/greplist -e binary ./testdata/grepinput) >>testtry
252echo "RC=$?" >>testtry
253
254echo "---------------------------- Test 46 ------------------------------" >>testtry
255(cd $srcdir; $valgrind $pcregrep -eabc -e '(unclosed' ./testdata/grepinput) 2>>testtry >>testtry
256echo "RC=$?" >>testtry
257
258echo "---------------------------- Test 47 ------------------------------" >>testtry
259(cd $srcdir; $valgrind $pcregrep -Fx "AB.VE
260elephant" ./testdata/grepinput) >>testtry
261echo "RC=$?" >>testtry
262
263echo "---------------------------- Test 48 ------------------------------" >>testtry
264(cd $srcdir; $valgrind $pcregrep -F "AB.VE
265elephant" ./testdata/grepinput) >>testtry
266echo "RC=$?" >>testtry
267
268echo "---------------------------- Test 49 ------------------------------" >>testtry
269(cd $srcdir; $valgrind $pcregrep -F -e DATA -e "AB.VE
270elephant" ./testdata/grepinput) >>testtry
271echo "RC=$?" >>testtry
272
273echo "---------------------------- Test 50 ------------------------------" >>testtry
274(cd $srcdir; $valgrind $pcregrep "^(abc|def|ghi|jkl)" ./testdata/grepinputx) >>testtry
275echo "RC=$?" >>testtry
276
277echo "---------------------------- Test 51 ------------------------------" >>testtry
278(cd $srcdir; $valgrind $pcregrep -Mv "brown\sfox" ./testdata/grepinputv) >>testtry
279echo "RC=$?" >>testtry
280
281echo "---------------------------- Test 52 ------------------------------" >>testtry
282(cd $srcdir; $valgrind $pcregrep --colour=always jumps ./testdata/grepinputv) >>testtry
283echo "RC=$?" >>testtry
284
285echo "---------------------------- Test 53 ------------------------------" >>testtry
286(cd $srcdir; $valgrind $pcregrep --file-offsets 'before|zero|after' ./testdata/grepinput) >>testtry
287echo "RC=$?" >>testtry
288
289echo "---------------------------- Test 54 ------------------------------" >>testtry
290(cd $srcdir; $valgrind $pcregrep --line-offsets 'before|zero|after' ./testdata/grepinput) >>testtry
291echo "RC=$?" >>testtry
292
293echo "---------------------------- Test 55 -----------------------------" >>testtry
294(cd $srcdir; $valgrind $pcregrep -f./testdata/greplist --color=always ./testdata/grepinputx) >>testtry
295echo "RC=$?" >>testtry
296
297echo "---------------------------- Test 56 -----------------------------" >>testtry
298(cd $srcdir; $valgrind $pcregrep -c lazy ./testdata/grepinput*) >>testtry
299echo "RC=$?" >>testtry
300
301echo "---------------------------- Test 57 -----------------------------" >>testtry
302(cd $srcdir; $valgrind $pcregrep -c -l lazy ./testdata/grepinput*) >>testtry
303echo "RC=$?" >>testtry
304
305echo "---------------------------- Test 58 -----------------------------" >>testtry
306(cd $srcdir; $valgrind $pcregrep --regex=PATTERN ./testdata/grepinput) >>testtry
307echo "RC=$?" >>testtry
308
309echo "---------------------------- Test 59 -----------------------------" >>testtry
310(cd $srcdir; $valgrind $pcregrep --regexp=PATTERN ./testdata/grepinput) >>testtry
311echo "RC=$?" >>testtry
312
313echo "---------------------------- Test 60 -----------------------------" >>testtry
314(cd $srcdir; $valgrind $pcregrep --regex PATTERN ./testdata/grepinput) >>testtry
315echo "RC=$?" >>testtry
316
317echo "---------------------------- Test 61 -----------------------------" >>testtry
318(cd $srcdir; $valgrind $pcregrep --regexp PATTERN ./testdata/grepinput) >>testtry
319echo "RC=$?" >>testtry
320
321echo "---------------------------- Test 62 -----------------------------" >>testtry
322(cd $srcdir; $valgrind $pcregrep --match-limit=1000 --no-jit -M 'This is a file(.|\R)*file.' ./testdata/grepinput) >>testtry 2>&1
323echo "RC=$?" >>testtry
324
325echo "---------------------------- Test 63 -----------------------------" >>testtry
326(cd $srcdir; $valgrind $pcregrep --recursion-limit=1000 --no-jit -M 'This is a file(.|\R)*file.' ./testdata/grepinput) >>testtry 2>&1
327echo "RC=$?" >>testtry
328
329echo "---------------------------- Test 64 ------------------------------" >>testtry
330(cd $srcdir; $valgrind $pcregrep -o1 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtry
331echo "RC=$?" >>testtry
332
333echo "---------------------------- Test 65 ------------------------------" >>testtry
334(cd $srcdir; $valgrind $pcregrep -o2 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtry
335echo "RC=$?" >>testtry
336
337echo "---------------------------- Test 66 ------------------------------" >>testtry
338(cd $srcdir; $valgrind $pcregrep -o3 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtry
339echo "RC=$?" >>testtry
340
341echo "---------------------------- Test 67 ------------------------------" >>testtry
342(cd $srcdir; $valgrind $pcregrep -o12 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtry
343echo "RC=$?" >>testtry
344
345echo "---------------------------- Test 68 ------------------------------" >>testtry
346(cd $srcdir; $valgrind $pcregrep --only-matching=2 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtry
347echo "RC=$?" >>testtry
348
349echo "---------------------------- Test 69 -----------------------------" >>testtry
350(cd $srcdir; $valgrind $pcregrep -vn --colour=always pattern ./testdata/grepinputx) >>testtry
351echo "RC=$?" >>testtry
352
353echo "---------------------------- Test 70 -----------------------------" >>testtry
354(cd $srcdir; $valgrind $pcregrep --color=always -M "triple:\t.*\n\n" ./testdata/grepinput3) >>testtry
355echo "RC=$?" >>testtry
356
357echo "---------------------------- Test 71 -----------------------------" >>testtry
358(cd $srcdir; $valgrind $pcregrep -o "^01|^02|^03" ./testdata/grepinput) >>testtry
359echo "RC=$?" >>testtry
360
361echo "---------------------------- Test 72 -----------------------------" >>testtry
362(cd $srcdir; $valgrind $pcregrep --color=always "^01|^02|^03" ./testdata/grepinput) >>testtry
363echo "RC=$?" >>testtry
364
365echo "---------------------------- Test 73 -----------------------------" >>testtry
366(cd $srcdir; $valgrind $pcregrep -o --colour=always "^01|^02|^03" ./testdata/grepinput) >>testtry
367echo "RC=$?" >>testtry
368
369echo "---------------------------- Test 74 -----------------------------" >>testtry
370(cd $srcdir; $valgrind $pcregrep -o "^01|02|^03" ./testdata/grepinput) >>testtry
371echo "RC=$?" >>testtry
372
373echo "---------------------------- Test 75 -----------------------------" >>testtry
374(cd $srcdir; $valgrind $pcregrep --color=always "^01|02|^03" ./testdata/grepinput) >>testtry
375echo "RC=$?" >>testtry
376
377echo "---------------------------- Test 76 -----------------------------" >>testtry
378(cd $srcdir; $valgrind $pcregrep -o --colour=always "^01|02|^03" ./testdata/grepinput) >>testtry
379echo "RC=$?" >>testtry
380
381echo "---------------------------- Test 77 -----------------------------" >>testtry
382(cd $srcdir; $valgrind $pcregrep -o "^01|^02|03" ./testdata/grepinput) >>testtry
383echo "RC=$?" >>testtry
384
385echo "---------------------------- Test 78 -----------------------------" >>testtry
386(cd $srcdir; $valgrind $pcregrep --color=always "^01|^02|03" ./testdata/grepinput) >>testtry
387echo "RC=$?" >>testtry
388
389echo "---------------------------- Test 79 -----------------------------" >>testtry
390(cd $srcdir; $valgrind $pcregrep -o --colour=always "^01|^02|03" ./testdata/grepinput) >>testtry
391echo "RC=$?" >>testtry
392
393echo "---------------------------- Test 80 -----------------------------" >>testtry
394(cd $srcdir; $valgrind $pcregrep -o "\b01|\b02" ./testdata/grepinput) >>testtry
395echo "RC=$?" >>testtry
396
397echo "---------------------------- Test 81 -----------------------------" >>testtry
398(cd $srcdir; $valgrind $pcregrep --color=always "\\b01|\\b02" ./testdata/grepinput) >>testtry
399echo "RC=$?" >>testtry
400
401echo "---------------------------- Test 82 -----------------------------" >>testtry
402(cd $srcdir; $valgrind $pcregrep -o --colour=always "\\b01|\\b02" ./testdata/grepinput) >>testtry
403echo "RC=$?" >>testtry
404
405echo "---------------------------- Test 83 -----------------------------" >>testtry
406(cd $srcdir; $valgrind $pcregrep --buffer-size=100 "^a" ./testdata/grepinput3) >>testtry 2>&1
407echo "RC=$?" >>testtry
408
409# Now compare the results.
410
411$cf $srcdir/testdata/grepoutput testtry
412if [ $? != 0 ] ; then exit 1; fi
413
414
415# These tests require UTF-8 support
416
417if [ $utf8 -ne 0 ] ; then
418 echo "Testing pcregrep UTF-8 features"
419
420 echo "---------------------------- Test U1 ------------------------------" >testtry
421 (cd $srcdir; $valgrind $pcregrep -n -u --newline=any "^X" ./testdata/grepinput8) >>testtry
422 echo "RC=$?" >>testtry
423
424 echo "---------------------------- Test U2 ------------------------------" >>testtry
425 (cd $srcdir; $valgrind $pcregrep -n -u -C 3 --newline=any "Match" ./testdata/grepinput8) >>testtry
426 echo "RC=$?" >>testtry
427
428 $cf $srcdir/testdata/grepoutput8 testtry
429 if [ $? != 0 ] ; then exit 1; fi
430
431else
432 echo "Skipping pcregrep UTF-8 tests: no UTF-8 support in PCRE library"
433fi
434
435
436# We go to some contortions to try to ensure that the tests for the various
437# newline settings will work in environments where the normal newline sequence
438# is not \n. Do not use exported files, whose line endings might be changed.
439# Instead, create an input file using printf so that its contents are exactly
440# what we want. Note the messy fudge to get printf to write a string that
441# starts with a hyphen.
442
443echo "Testing pcregrep newline settings"
444printf "abc\rdef\r\nghi\njkl" >testNinput
445
446printf "%c--------------------------- Test N1 ------------------------------\r\n" - >testtry
447$valgrind $pcregrep -n -N CR "^(abc|def|ghi|jkl)" testNinput >>testtry
448
449printf "%c--------------------------- Test N2 ------------------------------\r\n" - >>testtry
450$valgrind $pcregrep -n --newline=crlf "^(abc|def|ghi|jkl)" testNinput >>testtry
451
452printf "%c--------------------------- Test N3 ------------------------------\r\n" - >>testtry
453pattern=`printf 'def\rjkl'`
454$valgrind $pcregrep -n --newline=cr -F "$pattern" testNinput >>testtry
455
456printf "%c--------------------------- Test N4 ------------------------------\r\n" - >>testtry
457pattern=`printf 'xxx\r\njkl'`
458$valgrind $pcregrep -n --newline=crlf -F "$pattern" testNinput >>testtry
459
460printf "%c--------------------------- Test N5 ------------------------------\r\n" - >>testtry
461$valgrind $pcregrep -n --newline=any "^(abc|def|ghi|jkl)" testNinput >>testtry
462
463printf "%c--------------------------- Test N6 ------------------------------\r\n" - >>testtry
464$valgrind $pcregrep -n --newline=anycrlf "^(abc|def|ghi|jkl)" testNinput >>testtry
465
466$cf $srcdir/testdata/grepoutputN testtry
467if [ $? != 0 ] ; then exit 1; fi
468
469exit 0
470
471# End