/[pcre]/code/trunk/RunGrepTest
ViewVC logotype

Diff of /code/trunk/RunGrepTest

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 561 by ph10, Sat Oct 30 18:37:47 2010 UTC revision 644 by ph10, Sat Jul 30 17:13:00 2011 UTC
# Line 10  export LC_ALL Line 10  export LC_ALL
10    
11  pcregrep=`pwd`/pcregrep  pcregrep=`pwd`/pcregrep
12    
 echo " "  
 echo "Testing pcregrep"  
 $pcregrep -V  
   
13  valgrind=  valgrind=
14  while [ $# -gt 0 ] ; do  while [ $# -gt 0 ] ; do
15    case $1 in    case $1 in
16      valgrind) valgrind="valgrind -q --leak-check=no";;      valgrind) valgrind="valgrind -q --leak-check=no";;
17      *) echo "Unknown argument $1"; exit 1;;      *) echo "RunGrepTest: Unknown argument $1"; exit 1;;
18    esac    esac
19    shift    shift
20  done  done
21    
22    echo " "
23    if [ "$valgrind" = "" ] ; then
24      echo "Testing pcregrep"
25    else
26      echo "Testing pcregrep using valgrind"
27    fi
28    
29    $pcregrep -V
30    
31  cf="diff -ub"  cf="diff -ub"
32    
33  # Set up a suitable "diff" command for comparison. Some systems have a diff  # Set up a suitable "diff" command for comparison. Some systems have a diff
# Line 52  utf8=$? Line 57  utf8=$?
57    
58  echo "---------------------------- Test 1 ------------------------------" >testtry  echo "---------------------------- Test 1 ------------------------------" >testtry
59  (cd $srcdir; $valgrind $pcregrep PATTERN ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep PATTERN ./testdata/grepinput) >>testtry
60    echo "RC=$?" >>testtry
61    
62  echo "---------------------------- Test 2 ------------------------------" >>testtry  echo "---------------------------- Test 2 ------------------------------" >>testtry
63  (cd $srcdir; $valgrind $pcregrep '^PATTERN' ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep '^PATTERN' ./testdata/grepinput) >>testtry
64    echo "RC=$?" >>testtry
65    
66  echo "---------------------------- Test 3 ------------------------------" >>testtry  echo "---------------------------- Test 3 ------------------------------" >>testtry
67  (cd $srcdir; $valgrind $pcregrep -in PATTERN ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep -in PATTERN ./testdata/grepinput) >>testtry
68    echo "RC=$?" >>testtry
69    
70  echo "---------------------------- Test 4 ------------------------------" >>testtry  echo "---------------------------- Test 4 ------------------------------" >>testtry
71  (cd $srcdir; $valgrind $pcregrep -ic PATTERN ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep -ic PATTERN ./testdata/grepinput) >>testtry
72    echo "RC=$?" >>testtry
73    
74  echo "---------------------------- Test 5 ------------------------------" >>testtry  echo "---------------------------- Test 5 ------------------------------" >>testtry
75  (cd $srcdir; $valgrind $pcregrep -in PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -in PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
76    echo "RC=$?" >>testtry
77    
78  echo "---------------------------- Test 6 ------------------------------" >>testtry  echo "---------------------------- Test 6 ------------------------------" >>testtry
79  (cd $srcdir; $valgrind $pcregrep -inh PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -inh PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
80    echo "RC=$?" >>testtry
81    
82  echo "---------------------------- Test 7 ------------------------------" >>testtry  echo "---------------------------- Test 7 ------------------------------" >>testtry
83  (cd $srcdir; $valgrind $pcregrep -il PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -il PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
84    echo "RC=$?" >>testtry
85    
86  echo "---------------------------- Test 8 ------------------------------" >>testtry  echo "---------------------------- Test 8 ------------------------------" >>testtry
87  (cd $srcdir; $valgrind $pcregrep -l PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -l PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
88    echo "RC=$?" >>testtry
89    
90  echo "---------------------------- Test 9 ------------------------------" >>testtry  echo "---------------------------- Test 9 ------------------------------" >>testtry
91  (cd $srcdir; $valgrind $pcregrep -q PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -q PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
# Line 84  echo "RC=$?" >>testtry Line 97  echo "RC=$?" >>testtry
97    
98  echo "---------------------------- Test 11 -----------------------------" >>testtry  echo "---------------------------- Test 11 -----------------------------" >>testtry
99  (cd $srcdir; $valgrind $pcregrep -vn pattern ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -vn pattern ./testdata/grepinputx) >>testtry
100    echo "RC=$?" >>testtry
101    
102  echo "---------------------------- Test 12 -----------------------------" >>testtry  echo "---------------------------- Test 12 -----------------------------" >>testtry
103  (cd $srcdir; $valgrind $pcregrep -ix pattern ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -ix pattern ./testdata/grepinputx) >>testtry
104    echo "RC=$?" >>testtry
105    
106  echo "---------------------------- Test 13 -----------------------------" >>testtry  echo "---------------------------- Test 13 -----------------------------" >>testtry
107  (cd $srcdir; $valgrind $pcregrep -f./testdata/greplist ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -f./testdata/greplist ./testdata/grepinputx) >>testtry
108    echo "RC=$?" >>testtry
109    
110  echo "---------------------------- Test 14 -----------------------------" >>testtry  echo "---------------------------- Test 14 -----------------------------" >>testtry
111  (cd $srcdir; $valgrind $pcregrep -w pat ./testdata/grepinput ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -w pat ./testdata/grepinput ./testdata/grepinputx) >>testtry
112    echo "RC=$?" >>testtry
113    
114  echo "---------------------------- Test 15 -----------------------------" >>testtry  echo "---------------------------- Test 15 -----------------------------" >>testtry
115  (cd $srcdir; $valgrind $pcregrep 'abc^*' ./testdata/grepinput) 2>>testtry >>testtry  (cd $srcdir; $valgrind $pcregrep 'abc^*' ./testdata/grepinput) 2>>testtry >>testtry
116    echo "RC=$?" >>testtry
117    
118  echo "---------------------------- Test 16 -----------------------------" >>testtry  echo "---------------------------- Test 16 -----------------------------" >>testtry
119  (cd $srcdir; $valgrind $pcregrep abc ./testdata/grepinput ./testdata/nonexistfile) 2>>testtry >>testtry  (cd $srcdir; $valgrind $pcregrep abc ./testdata/grepinput ./testdata/nonexistfile) 2>>testtry >>testtry
120    echo "RC=$?" >>testtry
121    
122  echo "---------------------------- Test 17 -----------------------------" >>testtry  echo "---------------------------- Test 17 -----------------------------" >>testtry
123  (cd $srcdir; $valgrind $pcregrep -M 'the\noutput' ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep -M 'the\noutput' ./testdata/grepinput) >>testtry
124    echo "RC=$?" >>testtry
125    
126  echo "---------------------------- Test 18 -----------------------------" >>testtry  echo "---------------------------- Test 18 -----------------------------" >>testtry
127  (cd $srcdir; $valgrind $pcregrep -Mn '(the\noutput|dog\.\n--)' ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep -Mn '(the\noutput|dog\.\n--)' ./testdata/grepinput) >>testtry
128    echo "RC=$?" >>testtry
129    
130  echo "---------------------------- Test 19 -----------------------------" >>testtry  echo "---------------------------- Test 19 -----------------------------" >>testtry
131  (cd $srcdir; $valgrind $pcregrep -Mix 'Pattern' ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -Mix 'Pattern' ./testdata/grepinputx) >>testtry
132    echo "RC=$?" >>testtry
133    
134  echo "---------------------------- Test 20 -----------------------------" >>testtry  echo "---------------------------- Test 20 -----------------------------" >>testtry
135  (cd $srcdir; $valgrind $pcregrep -Mixn 'complete pair\nof lines' ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -Mixn 'complete pair\nof lines' ./testdata/grepinputx) >>testtry
136    echo "RC=$?" >>testtry
137    
138  echo "---------------------------- Test 21 -----------------------------" >>testtry  echo "---------------------------- Test 21 -----------------------------" >>testtry
139  (cd $srcdir; $valgrind $pcregrep -nA3 'four' ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -nA3 'four' ./testdata/grepinputx) >>testtry
140    echo "RC=$?" >>testtry
141    
142  echo "---------------------------- Test 22 -----------------------------" >>testtry  echo "---------------------------- Test 22 -----------------------------" >>testtry
143  (cd $srcdir; $valgrind $pcregrep -nB3 'four' ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -nB3 'four' ./testdata/grepinputx) >>testtry
144    echo "RC=$?" >>testtry
145    
146  echo "---------------------------- Test 23 -----------------------------" >>testtry  echo "---------------------------- Test 23 -----------------------------" >>testtry
147  (cd $srcdir; $valgrind $pcregrep -C3 'four' ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -C3 'four' ./testdata/grepinputx) >>testtry
148    echo "RC=$?" >>testtry
149    
150  echo "---------------------------- Test 24 -----------------------------" >>testtry  echo "---------------------------- Test 24 -----------------------------" >>testtry
151  (cd $srcdir; $valgrind $pcregrep -A9 'four' ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -A9 'four' ./testdata/grepinputx) >>testtry
152    echo "RC=$?" >>testtry
153    
154  echo "---------------------------- Test 25 -----------------------------" >>testtry  echo "---------------------------- Test 25 -----------------------------" >>testtry
155  (cd $srcdir; $valgrind $pcregrep -nB9 'four' ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -nB9 'four' ./testdata/grepinputx) >>testtry
156    echo "RC=$?" >>testtry
157    
158  echo "---------------------------- Test 26 -----------------------------" >>testtry  echo "---------------------------- Test 26 -----------------------------" >>testtry
159  (cd $srcdir; $valgrind $pcregrep -A9 -B9 'four' ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -A9 -B9 'four' ./testdata/grepinputx) >>testtry
160    echo "RC=$?" >>testtry
161    
162  echo "---------------------------- Test 27 -----------------------------" >>testtry  echo "---------------------------- Test 27 -----------------------------" >>testtry
163  (cd $srcdir; $valgrind $pcregrep -A10 'four' ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -A10 'four' ./testdata/grepinputx) >>testtry
164    echo "RC=$?" >>testtry
165    
166  echo "---------------------------- Test 28 -----------------------------" >>testtry  echo "---------------------------- Test 28 -----------------------------" >>testtry
167  (cd $srcdir; $valgrind $pcregrep -nB10 'four' ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -nB10 'four' ./testdata/grepinputx) >>testtry
168    echo "RC=$?" >>testtry
169    
170  echo "---------------------------- Test 29 -----------------------------" >>testtry  echo "---------------------------- Test 29 -----------------------------" >>testtry
171  (cd $srcdir; $valgrind $pcregrep -C12 -B10 'four' ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -C12 -B10 'four' ./testdata/grepinputx) >>testtry
172    echo "RC=$?" >>testtry
173    
174  echo "---------------------------- Test 30 -----------------------------" >>testtry  echo "---------------------------- Test 30 -----------------------------" >>testtry
175  (cd $srcdir; $valgrind $pcregrep -inB3 'pattern' ./testdata/grepinput ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -inB3 'pattern' ./testdata/grepinput ./testdata/grepinputx) >>testtry
176    echo "RC=$?" >>testtry
177    
178  echo "---------------------------- Test 31 -----------------------------" >>testtry  echo "---------------------------- Test 31 -----------------------------" >>testtry
179  (cd $srcdir; $valgrind $pcregrep -inA3 'pattern' ./testdata/grepinput ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -inA3 'pattern' ./testdata/grepinput ./testdata/grepinputx) >>testtry
180    echo "RC=$?" >>testtry
181    
182  echo "---------------------------- Test 32 -----------------------------" >>testtry  echo "---------------------------- Test 32 -----------------------------" >>testtry
183  (cd $srcdir; $valgrind $pcregrep -L 'fox' ./testdata/grepinput ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -L 'fox' ./testdata/grepinput ./testdata/grepinputx) >>testtry
184    echo "RC=$?" >>testtry
185    
186  echo "---------------------------- Test 33 -----------------------------" >>testtry  echo "---------------------------- Test 33 -----------------------------" >>testtry
187  (cd $srcdir; $valgrind $pcregrep 'fox' ./testdata/grepnonexist) >>testtry 2>&1  (cd $srcdir; $valgrind $pcregrep 'fox' ./testdata/grepnonexist) >>testtry 2>&1
# Line 157  echo "---------------------------- Test Line 192  echo "---------------------------- Test
192  echo "RC=$?" >>testtry  echo "RC=$?" >>testtry
193    
194  echo "---------------------------- Test 35 -----------------------------" >>testtry  echo "---------------------------- Test 35 -----------------------------" >>testtry
195  (cd $srcdir; $valgrind $pcregrep -L -r --include=grepinputx --exclude_dir='^\.' 'fox' ./testdata) >>testtry  (cd $srcdir; $valgrind $pcregrep -L -r --include=grepinputx --exclude-dir='^\.' 'fox' ./testdata) >>testtry
196  echo "RC=$?" >>testtry  echo "RC=$?" >>testtry
197    
198  echo "---------------------------- Test 36 -----------------------------" >>testtry  echo "---------------------------- Test 36 -----------------------------" >>testtry
# Line 172  cat teststderr >>testtry Line 207  cat teststderr >>testtry
207    
208  echo "---------------------------- Test 38 ------------------------------" >>testtry  echo "---------------------------- Test 38 ------------------------------" >>testtry
209  (cd $srcdir; $valgrind $pcregrep '>\x00<' ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep '>\x00<' ./testdata/grepinput) >>testtry
210    echo "RC=$?" >>testtry
211    
212  echo "---------------------------- Test 39 ------------------------------" >>testtry  echo "---------------------------- Test 39 ------------------------------" >>testtry
213  (cd $srcdir; $valgrind $pcregrep -A1 'before the binary zero' ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep -A1 'before the binary zero' ./testdata/grepinput) >>testtry
214    echo "RC=$?" >>testtry
215    
216  echo "---------------------------- Test 40 ------------------------------" >>testtry  echo "---------------------------- Test 40 ------------------------------" >>testtry
217  (cd $srcdir; $valgrind $pcregrep -B1 'after the binary zero' ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep -B1 'after the binary zero' ./testdata/grepinput) >>testtry
218    echo "RC=$?" >>testtry
219    
220  echo "---------------------------- Test 41 ------------------------------" >>testtry  echo "---------------------------- Test 41 ------------------------------" >>testtry
221  (cd $srcdir; $valgrind $pcregrep -B1 -o '\w+ the binary zero' ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep -B1 -o '\w+ the binary zero' ./testdata/grepinput) >>testtry
222    echo "RC=$?" >>testtry
223    
224  echo "---------------------------- Test 41 ------------------------------" >>testtry  echo "---------------------------- Test 42 ------------------------------" >>testtry
225  (cd $srcdir; $valgrind $pcregrep -B1 -onH '\w+ the binary zero' ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep -B1 -onH '\w+ the binary zero' ./testdata/grepinput) >>testtry
226    echo "RC=$?" >>testtry
227    
228  echo "---------------------------- Test 42 ------------------------------" >>testtry  echo "---------------------------- Test 43 ------------------------------" >>testtry
229  (cd $srcdir; $valgrind $pcregrep -on 'before|zero|after' ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep -on 'before|zero|after' ./testdata/grepinput) >>testtry
230    echo "RC=$?" >>testtry
231    
232  echo "---------------------------- Test 43 ------------------------------" >>testtry  echo "---------------------------- Test 44 ------------------------------" >>testtry
233  (cd $srcdir; $valgrind $pcregrep -on -e before -ezero -e after ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep -on -e before -ezero -e after ./testdata/grepinput) >>testtry
234    echo "RC=$?" >>testtry
235    
236  echo "---------------------------- Test 44 ------------------------------" >>testtry  echo "---------------------------- Test 45 ------------------------------" >>testtry
237  (cd $srcdir; $valgrind $pcregrep -on -f ./testdata/greplist -e binary ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep -on -f ./testdata/greplist -e binary ./testdata/grepinput) >>testtry
238    echo "RC=$?" >>testtry
239    
240  echo "---------------------------- Test 45 ------------------------------" >>testtry  echo "---------------------------- Test 46 ------------------------------" >>testtry
241  (cd $srcdir; $valgrind $pcregrep -eabc -e '(unclosed' ./testdata/grepinput) 2>>testtry >>testtry  (cd $srcdir; $valgrind $pcregrep -eabc -e '(unclosed' ./testdata/grepinput) 2>>testtry >>testtry
242    echo "RC=$?" >>testtry
243    
244  echo "---------------------------- Test 46 ------------------------------" >>testtry  echo "---------------------------- Test 47 ------------------------------" >>testtry
245  (cd $srcdir; $valgrind $pcregrep -Fx "AB.VE  (cd $srcdir; $valgrind $pcregrep -Fx "AB.VE
246  elephant" ./testdata/grepinput) >>testtry  elephant" ./testdata/grepinput) >>testtry
247    echo "RC=$?" >>testtry
248    
249  echo "---------------------------- Test 47 ------------------------------" >>testtry  echo "---------------------------- Test 48 ------------------------------" >>testtry
250  (cd $srcdir; $valgrind $pcregrep -F "AB.VE  (cd $srcdir; $valgrind $pcregrep -F "AB.VE
251  elephant" ./testdata/grepinput) >>testtry  elephant" ./testdata/grepinput) >>testtry
252    echo "RC=$?" >>testtry
253    
254  echo "---------------------------- Test 48 ------------------------------" >>testtry  echo "---------------------------- Test 49 ------------------------------" >>testtry
255  (cd $srcdir; $valgrind $pcregrep -F -e DATA -e "AB.VE  (cd $srcdir; $valgrind $pcregrep -F -e DATA -e "AB.VE
256  elephant" ./testdata/grepinput) >>testtry  elephant" ./testdata/grepinput) >>testtry
257    echo "RC=$?" >>testtry
258    
259  echo "---------------------------- Test 49 ------------------------------" >>testtry  echo "---------------------------- Test 50 ------------------------------" >>testtry
260  (cd $srcdir; $valgrind $pcregrep "^(abc|def|ghi|jkl)" ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep "^(abc|def|ghi|jkl)" ./testdata/grepinputx) >>testtry
261    echo "RC=$?" >>testtry
262    
263  echo "---------------------------- Test 50 ------------------------------" >>testtry  echo "---------------------------- Test 51 ------------------------------" >>testtry
264  (cd $srcdir; $valgrind $pcregrep -Mv "brown\sfox" ./testdata/grepinputv) >>testtry  (cd $srcdir; $valgrind $pcregrep -Mv "brown\sfox" ./testdata/grepinputv) >>testtry
265    echo "RC=$?" >>testtry
266    
267  echo "---------------------------- Test 51 ------------------------------" >>testtry  echo "---------------------------- Test 52 ------------------------------" >>testtry
268  (cd $srcdir; $valgrind $pcregrep --colour=always jumps ./testdata/grepinputv) >>testtry  (cd $srcdir; $valgrind $pcregrep --colour=always jumps ./testdata/grepinputv) >>testtry
269    echo "RC=$?" >>testtry
270    
271  echo "---------------------------- Test 52 ------------------------------" >>testtry  echo "---------------------------- Test 53 ------------------------------" >>testtry
272  (cd $srcdir; $valgrind $pcregrep --file-offsets 'before|zero|after' ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep --file-offsets 'before|zero|after' ./testdata/grepinput) >>testtry
273    echo "RC=$?" >>testtry
274    
275  echo "---------------------------- Test 53 ------------------------------" >>testtry  echo "---------------------------- Test 54 ------------------------------" >>testtry
276  (cd $srcdir; $valgrind $pcregrep --line-offsets 'before|zero|after' ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep --line-offsets 'before|zero|after' ./testdata/grepinput) >>testtry
277    echo "RC=$?" >>testtry
278    
279  echo "---------------------------- Test 54 -----------------------------" >>testtry  echo "---------------------------- Test 55 -----------------------------" >>testtry
280  (cd $srcdir; $valgrind $pcregrep -f./testdata/greplist --color=always ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -f./testdata/greplist --color=always ./testdata/grepinputx) >>testtry
281    echo "RC=$?" >>testtry
282    
283  echo "---------------------------- Test 55 -----------------------------" >>testtry  echo "---------------------------- Test 56 -----------------------------" >>testtry
284  (cd $srcdir; $valgrind $pcregrep -c lazy ./testdata/grepinput*) >>testtry  (cd $srcdir; $valgrind $pcregrep -c lazy ./testdata/grepinput*) >>testtry
285    echo "RC=$?" >>testtry
286    
287  echo "---------------------------- Test 56 -----------------------------" >>testtry  echo "---------------------------- Test 57 -----------------------------" >>testtry
288  (cd $srcdir; $valgrind $pcregrep -c -l lazy ./testdata/grepinput*) >>testtry  (cd $srcdir; $valgrind $pcregrep -c -l lazy ./testdata/grepinput*) >>testtry
289    echo "RC=$?" >>testtry
290    
291  echo "---------------------------- Test 57 -----------------------------" >>testtry  echo "---------------------------- Test 58 -----------------------------" >>testtry
292  (cd $srcdir; $valgrind $pcregrep --regex=PATTERN ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep --regex=PATTERN ./testdata/grepinput) >>testtry
293    echo "RC=$?" >>testtry
294    
295  echo "---------------------------- Test 58 -----------------------------" >>testtry  echo "---------------------------- Test 59 -----------------------------" >>testtry
296  (cd $srcdir; $valgrind $pcregrep --regexp=PATTERN ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep --regexp=PATTERN ./testdata/grepinput) >>testtry
297    echo "RC=$?" >>testtry
298    
299  echo "---------------------------- Test 59 -----------------------------" >>testtry  echo "---------------------------- Test 60 -----------------------------" >>testtry
300  (cd $srcdir; $valgrind $pcregrep --regex PATTERN ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep --regex PATTERN ./testdata/grepinput) >>testtry
301    echo "RC=$?" >>testtry
302    
303  echo "---------------------------- Test 60 -----------------------------" >>testtry  echo "---------------------------- Test 61 -----------------------------" >>testtry
304  (cd $srcdir; $valgrind $pcregrep --regexp PATTERN ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep --regexp PATTERN ./testdata/grepinput) >>testtry
305    echo "RC=$?" >>testtry
306    
307  echo "---------------------------- Test 61 -----------------------------" >>testtry  echo "---------------------------- Test 62 -----------------------------" >>testtry
308  (cd $srcdir; $valgrind $pcregrep --match-limit=1000 -M 'This is a file(.|\R)*file.' ./testdata/grepinput) >>testtry 2>&1  (cd $srcdir; $valgrind $pcregrep --match-limit=1000 -M 'This is a file(.|\R)*file.' ./testdata/grepinput) >>testtry 2>&1
309    echo "RC=$?" >>testtry
310    
311  echo "---------------------------- Test 62 -----------------------------" >>testtry  echo "---------------------------- Test 63 -----------------------------" >>testtry
312  (cd $srcdir; $valgrind $pcregrep --recursion-limit=1000 -M 'This is a file(.|\R)*file.' ./testdata/grepinput) >>testtry 2>&1  (cd $srcdir; $valgrind $pcregrep --recursion-limit=1000 -M 'This is a file(.|\R)*file.' ./testdata/grepinput) >>testtry 2>&1
313    echo "RC=$?" >>testtry
314    
315    echo "---------------------------- Test 64 ------------------------------" >>testtry
316    (cd $srcdir; $valgrind $pcregrep -o1 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtry
317    echo "RC=$?" >>testtry
318    
319    echo "---------------------------- Test 65 ------------------------------" >>testtry
320    (cd $srcdir; $valgrind $pcregrep -o2 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtry
321    echo "RC=$?" >>testtry
322    
323    echo "---------------------------- Test 66 ------------------------------" >>testtry
324    (cd $srcdir; $valgrind $pcregrep -o3 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtry
325    echo "RC=$?" >>testtry
326    
327    echo "---------------------------- Test 67 ------------------------------" >>testtry
328    (cd $srcdir; $valgrind $pcregrep -o12 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtry
329    echo "RC=$?" >>testtry
330    
331    echo "---------------------------- Test 68 ------------------------------" >>testtry
332    (cd $srcdir; $valgrind $pcregrep --only-matching=2 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtry
333    echo "RC=$?" >>testtry
334    
335    echo "---------------------------- Test 69 -----------------------------" >>testtry
336    (cd $srcdir; $valgrind $pcregrep -vn --colour=always pattern ./testdata/grepinputx) >>testtry
337    echo "RC=$?" >>testtry
338    
339    echo "---------------------------- Test 70 -----------------------------" >>testtry
340    (cd $srcdir; $valgrind $pcregrep --color=always -M "triple:\t.*\n\n" ./testdata/grepinput3) >>testtry
341    echo "RC=$?" >>testtry
342    
343    echo "---------------------------- Test 71 -----------------------------" >>testtry
344    (cd $srcdir; $valgrind $pcregrep -o "^01|^02|^03" ./testdata/grepinput) >>testtry
345    echo "RC=$?" >>testtry
346    
347    echo "---------------------------- Test 72 -----------------------------" >>testtry
348    (cd $srcdir; $valgrind $pcregrep --color=always "^01|^02|^03" ./testdata/grepinput) >>testtry
349    echo "RC=$?" >>testtry
350    
351    echo "---------------------------- Test 73 -----------------------------" >>testtry
352    (cd $srcdir; $valgrind $pcregrep -o --colour=always "^01|^02|^03" ./testdata/grepinput) >>testtry
353    echo "RC=$?" >>testtry
354    
355    echo "---------------------------- Test 74 -----------------------------" >>testtry
356    (cd $srcdir; $valgrind $pcregrep -o "^01|02|^03" ./testdata/grepinput) >>testtry
357    echo "RC=$?" >>testtry
358    
359    echo "---------------------------- Test 75 -----------------------------" >>testtry
360    (cd $srcdir; $valgrind $pcregrep --color=always "^01|02|^03" ./testdata/grepinput) >>testtry
361    echo "RC=$?" >>testtry
362    
363    echo "---------------------------- Test 76 -----------------------------" >>testtry
364    (cd $srcdir; $valgrind $pcregrep -o --colour=always "^01|02|^03" ./testdata/grepinput) >>testtry
365    echo "RC=$?" >>testtry
366    
367    echo "---------------------------- Test 77 -----------------------------" >>testtry
368    (cd $srcdir; $valgrind $pcregrep -o "^01|^02|03" ./testdata/grepinput) >>testtry
369    echo "RC=$?" >>testtry
370    
371    echo "---------------------------- Test 78 -----------------------------" >>testtry
372    (cd $srcdir; $valgrind $pcregrep --color=always "^01|^02|03" ./testdata/grepinput) >>testtry
373    echo "RC=$?" >>testtry
374    
375    echo "---------------------------- Test 79 -----------------------------" >>testtry
376    (cd $srcdir; $valgrind $pcregrep -o --colour=always "^01|^02|03" ./testdata/grepinput) >>testtry
377    echo "RC=$?" >>testtry
378    
379    echo "---------------------------- Test 80 -----------------------------" >>testtry
380    (cd $srcdir; $valgrind $pcregrep -o "\b01|\b02" ./testdata/grepinput) >>testtry
381    echo "RC=$?" >>testtry
382    
383    echo "---------------------------- Test 81 -----------------------------" >>testtry
384    (cd $srcdir; $valgrind $pcregrep --color=always "\\b01|\\b02" ./testdata/grepinput) >>testtry
385    echo "RC=$?" >>testtry
386    
387    echo "---------------------------- Test 82 -----------------------------" >>testtry
388    (cd $srcdir; $valgrind $pcregrep -o --colour=always "\\b01|\\b02" ./testdata/grepinput) >>testtry
389    echo "RC=$?" >>testtry
390    
391    echo "---------------------------- Test 83 -----------------------------" >>testtry
392    (cd $srcdir; $valgrind $pcregrep --buffer-size=100 "^a" ./testdata/grepinput3) >>testtry 2>&1
393    echo "RC=$?" >>testtry
394    
395  # Now compare the results.  # Now compare the results.
396    
# Line 264  if [ $utf8 -ne 0 ] ; then Line 405  if [ $utf8 -ne 0 ] ; then
405    
406    echo "---------------------------- Test U1 ------------------------------" >testtry    echo "---------------------------- Test U1 ------------------------------" >testtry
407    (cd $srcdir; $valgrind $pcregrep -n -u --newline=any "^X" ./testdata/grepinput8) >>testtry    (cd $srcdir; $valgrind $pcregrep -n -u --newline=any "^X" ./testdata/grepinput8) >>testtry
408      echo "RC=$?" >>testtry
409    
410    echo "---------------------------- Test U2 ------------------------------" >>testtry    echo "---------------------------- Test U2 ------------------------------" >>testtry
411    (cd $srcdir; $valgrind $pcregrep -n -u -C 3 --newline=any "Match" ./testdata/grepinput8) >>testtry    (cd $srcdir; $valgrind $pcregrep -n -u -C 3 --newline=any "Match" ./testdata/grepinput8) >>testtry
412      echo "RC=$?" >>testtry
413    
414    $cf $srcdir/testdata/grepoutput8 testtry    $cf $srcdir/testdata/grepoutput8 testtry
415    if [ $? != 0 ] ; then exit 1; fi    if [ $? != 0 ] ; then exit 1; fi

Legend:
Removed from v.561  
changed lines
  Added in v.644

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12