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

Diff of /code/trunk/RunGrepTest

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

revision 437 by ph10, Sun Sep 6 16:34:42 2009 UTC revision 836 by ph10, Wed Dec 28 17:16:11 2011 UTC
# Line 5  Line 5 
5  # supported by pcregrep.  # supported by pcregrep.
6    
7  # Set the C locale, so that sort(1) behaves predictably.  # Set the C locale, so that sort(1) behaves predictably.
8    
9  LC_ALL=C  LC_ALL=C
10  export LC_ALL  export LC_ALL
11    
12  pcregrep=`pwd`/pcregrep  # Remove any non-default colouring that the caller may have set.
13    
14  echo " "  unset PCREGREP_COLOUR PCREGREP_COLOR
15  echo "Testing pcregrep"  
16  $pcregrep -V  # Set the program to be tested, and valgrind settings when requested.
17    
18    pcregrep=`pwd`/pcregrep
19    
20  valgrind=  valgrind=
21  while [ $# -gt 0 ] ; do  while [ $# -gt 0 ] ; do
22    case $1 in    case $1 in
23      valgrind) valgrind="valgrind -q --leak-check=no";;      valgrind) valgrind="valgrind -q --leak-check=no --smc-check=all";;
24      *) echo "Unknown argument $1"; exit 1;;      *) echo "RunGrepTest: Unknown argument $1"; exit 1;;
25    esac    esac
26    shift    shift
27  done  done
28    
29  cf="diff -ub"  echo " "
30    if [ "$valgrind" = "" ] ; then
31      echo "Testing pcregrep"
32    else
33      echo "Testing pcregrep using valgrind"
34    fi
35    
36    $pcregrep -V
37    
38  # 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
39  # that lacks a -u option. Try to deal with this; better do the test for the -b  # that lacks a -u option. Try to deal with this; better do the test for the -b
40  # option as well.  # option as well.
41    
42  if diff -u /dev/null /dev/null; then  cf="diff -ub"
43    if diff -u /dev/null /dev/null; then
44    if diff -ub /dev/null /dev/null; then cf="diff -ub"; else cf="diff -u"; fi    if diff -ub /dev/null /dev/null; then cf="diff -ub"; else cf="diff -u"; fi
45  else  else
46    if diff -b /dev/null /dev/null; then cf="diff -b"; else cf="diff"; fi    if diff -b /dev/null /dev/null; then cf="diff -b"; else cf="diff"; fi
47  fi  fi
48    
49  # If PCRE has been built in a directory other than the source directory, and  # 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  # this test is being run from "make check" as usual, then $srcdir will be
51  # set. If not, set it to the current directory. We then arrange to run the  # set. If not, set it to the current or parent directory, whichever one
52  # pcregrep command in the source directory so that the file names that appear  # contains the test data. We then arrange to run the pcregrep command in the
53  # in the output are always the same.  # source directory so that the file names that appear in the output are always
54    # the same.
55    
56  if [ -z "$srcdir" -o ! -d "$srcdir/testdata" ] ; then  if [ -z "$srcdir" -o ! -d "$srcdir/testdata" ] ; then
57    srcdir=.    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
65  fi  fi
66    
67  # Check for the availability of UTF-8 support  # Check for the availability of UTF-8 support
68    
69  ./pcretest -C | ./pcregrep "No UTF-8 support" >/dev/null  ./pcretest -C utf >/dev/null
70  utf8=$?  utf8=$?
71    
72  echo "---------------------------- Test 1 ------------------------------" >testtry  echo "---------------------------- Test 1 ------------------------------" >testtry
73  (cd $srcdir; $valgrind $pcregrep PATTERN ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep PATTERN ./testdata/grepinput) >>testtry
74    echo "RC=$?" >>testtry
75    
76  echo "---------------------------- Test 2 ------------------------------" >>testtry  echo "---------------------------- Test 2 ------------------------------" >>testtry
77  (cd $srcdir; $valgrind $pcregrep '^PATTERN' ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep '^PATTERN' ./testdata/grepinput) >>testtry
78    echo "RC=$?" >>testtry
79    
80  echo "---------------------------- Test 3 ------------------------------" >>testtry  echo "---------------------------- Test 3 ------------------------------" >>testtry
81  (cd $srcdir; $valgrind $pcregrep -in PATTERN ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep -in PATTERN ./testdata/grepinput) >>testtry
82    echo "RC=$?" >>testtry
83    
84  echo "---------------------------- Test 4 ------------------------------" >>testtry  echo "---------------------------- Test 4 ------------------------------" >>testtry
85  (cd $srcdir; $valgrind $pcregrep -ic PATTERN ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep -ic PATTERN ./testdata/grepinput) >>testtry
86    echo "RC=$?" >>testtry
87    
88  echo "---------------------------- Test 5 ------------------------------" >>testtry  echo "---------------------------- Test 5 ------------------------------" >>testtry
89  (cd $srcdir; $valgrind $pcregrep -in PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -in PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
90    echo "RC=$?" >>testtry
91    
92  echo "---------------------------- Test 6 ------------------------------" >>testtry  echo "---------------------------- Test 6 ------------------------------" >>testtry
93  (cd $srcdir; $valgrind $pcregrep -inh PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -inh PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
94    echo "RC=$?" >>testtry
95    
96  echo "---------------------------- Test 7 ------------------------------" >>testtry  echo "---------------------------- Test 7 ------------------------------" >>testtry
97  (cd $srcdir; $valgrind $pcregrep -il PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -il PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
98    echo "RC=$?" >>testtry
99    
100  echo "---------------------------- Test 8 ------------------------------" >>testtry  echo "---------------------------- Test 8 ------------------------------" >>testtry
101  (cd $srcdir; $valgrind $pcregrep -l PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -l PATTERN ./testdata/grepinput ./testdata/grepinputx) >>testtry
102    echo "RC=$?" >>testtry
103    
104  echo "---------------------------- Test 9 ------------------------------" >>testtry  echo "---------------------------- Test 9 ------------------------------" >>testtry
105  (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 111  echo "RC=$?" >>testtry
111    
112  echo "---------------------------- Test 11 -----------------------------" >>testtry  echo "---------------------------- Test 11 -----------------------------" >>testtry
113  (cd $srcdir; $valgrind $pcregrep -vn pattern ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -vn pattern ./testdata/grepinputx) >>testtry
114    echo "RC=$?" >>testtry
115    
116  echo "---------------------------- Test 12 -----------------------------" >>testtry  echo "---------------------------- Test 12 -----------------------------" >>testtry
117  (cd $srcdir; $valgrind $pcregrep -ix pattern ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -ix pattern ./testdata/grepinputx) >>testtry
118    echo "RC=$?" >>testtry
119    
120  echo "---------------------------- Test 13 -----------------------------" >>testtry  echo "---------------------------- Test 13 -----------------------------" >>testtry
121  (cd $srcdir; $valgrind $pcregrep -f./testdata/greplist ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -f./testdata/greplist ./testdata/grepinputx) >>testtry
122    echo "RC=$?" >>testtry
123    
124  echo "---------------------------- Test 14 -----------------------------" >>testtry  echo "---------------------------- Test 14 -----------------------------" >>testtry
125  (cd $srcdir; $valgrind $pcregrep -w pat ./testdata/grepinput ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -w pat ./testdata/grepinput ./testdata/grepinputx) >>testtry
126    echo "RC=$?" >>testtry
127    
128  echo "---------------------------- Test 15 -----------------------------" >>testtry  echo "---------------------------- Test 15 -----------------------------" >>testtry
129  (cd $srcdir; $valgrind $pcregrep 'abc^*' ./testdata/grepinput) 2>>testtry >>testtry  (cd $srcdir; $valgrind $pcregrep 'abc^*' ./testdata/grepinput) 2>>testtry >>testtry
130    echo "RC=$?" >>testtry
131    
132  echo "---------------------------- Test 16 -----------------------------" >>testtry  echo "---------------------------- Test 16 -----------------------------" >>testtry
133  (cd $srcdir; $valgrind $pcregrep abc ./testdata/grepinput ./testdata/nonexistfile) 2>>testtry >>testtry  (cd $srcdir; $valgrind $pcregrep abc ./testdata/grepinput ./testdata/nonexistfile) 2>>testtry >>testtry
134    echo "RC=$?" >>testtry
135    
136  echo "---------------------------- Test 17 -----------------------------" >>testtry  echo "---------------------------- Test 17 -----------------------------" >>testtry
137  (cd $srcdir; $valgrind $pcregrep -M 'the\noutput' ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep -M 'the\noutput' ./testdata/grepinput) >>testtry
138    echo "RC=$?" >>testtry
139    
140  echo "---------------------------- Test 18 -----------------------------" >>testtry  echo "---------------------------- Test 18 -----------------------------" >>testtry
141  (cd $srcdir; $valgrind $pcregrep -Mn '(the\noutput|dog\.\n--)' ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep -Mn '(the\noutput|dog\.\n--)' ./testdata/grepinput) >>testtry
142    echo "RC=$?" >>testtry
143    
144  echo "---------------------------- Test 19 -----------------------------" >>testtry  echo "---------------------------- Test 19 -----------------------------" >>testtry
145  (cd $srcdir; $valgrind $pcregrep -Mix 'Pattern' ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -Mix 'Pattern' ./testdata/grepinputx) >>testtry
146    echo "RC=$?" >>testtry
147    
148  echo "---------------------------- Test 20 -----------------------------" >>testtry  echo "---------------------------- Test 20 -----------------------------" >>testtry
149  (cd $srcdir; $valgrind $pcregrep -Mixn 'complete pair\nof lines' ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -Mixn 'complete pair\nof lines' ./testdata/grepinputx) >>testtry
150    echo "RC=$?" >>testtry
151    
152  echo "---------------------------- Test 21 -----------------------------" >>testtry  echo "---------------------------- Test 21 -----------------------------" >>testtry
153  (cd $srcdir; $valgrind $pcregrep -nA3 'four' ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -nA3 'four' ./testdata/grepinputx) >>testtry
154    echo "RC=$?" >>testtry
155    
156  echo "---------------------------- Test 22 -----------------------------" >>testtry  echo "---------------------------- Test 22 -----------------------------" >>testtry
157  (cd $srcdir; $valgrind $pcregrep -nB3 'four' ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -nB3 'four' ./testdata/grepinputx) >>testtry
158    echo "RC=$?" >>testtry
159    
160  echo "---------------------------- Test 23 -----------------------------" >>testtry  echo "---------------------------- Test 23 -----------------------------" >>testtry
161  (cd $srcdir; $valgrind $pcregrep -C3 'four' ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -C3 'four' ./testdata/grepinputx) >>testtry
162    echo "RC=$?" >>testtry
163    
164  echo "---------------------------- Test 24 -----------------------------" >>testtry  echo "---------------------------- Test 24 -----------------------------" >>testtry
165  (cd $srcdir; $valgrind $pcregrep -A9 'four' ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -A9 'four' ./testdata/grepinputx) >>testtry
166    echo "RC=$?" >>testtry
167    
168  echo "---------------------------- Test 25 -----------------------------" >>testtry  echo "---------------------------- Test 25 -----------------------------" >>testtry
169  (cd $srcdir; $valgrind $pcregrep -nB9 'four' ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -nB9 'four' ./testdata/grepinputx) >>testtry
170    echo "RC=$?" >>testtry
171    
172  echo "---------------------------- Test 26 -----------------------------" >>testtry  echo "---------------------------- Test 26 -----------------------------" >>testtry
173  (cd $srcdir; $valgrind $pcregrep -A9 -B9 'four' ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -A9 -B9 'four' ./testdata/grepinputx) >>testtry
174    echo "RC=$?" >>testtry
175    
176  echo "---------------------------- Test 27 -----------------------------" >>testtry  echo "---------------------------- Test 27 -----------------------------" >>testtry
177  (cd $srcdir; $valgrind $pcregrep -A10 'four' ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -A10 'four' ./testdata/grepinputx) >>testtry
178    echo "RC=$?" >>testtry
179    
180  echo "---------------------------- Test 28 -----------------------------" >>testtry  echo "---------------------------- Test 28 -----------------------------" >>testtry
181  (cd $srcdir; $valgrind $pcregrep -nB10 'four' ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -nB10 'four' ./testdata/grepinputx) >>testtry
182    echo "RC=$?" >>testtry
183    
184  echo "---------------------------- Test 29 -----------------------------" >>testtry  echo "---------------------------- Test 29 -----------------------------" >>testtry
185  (cd $srcdir; $valgrind $pcregrep -C12 -B10 'four' ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -C12 -B10 'four' ./testdata/grepinputx) >>testtry
186    echo "RC=$?" >>testtry
187    
188  echo "---------------------------- Test 30 -----------------------------" >>testtry  echo "---------------------------- Test 30 -----------------------------" >>testtry
189  (cd $srcdir; $valgrind $pcregrep -inB3 'pattern' ./testdata/grepinput ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -inB3 'pattern' ./testdata/grepinput ./testdata/grepinputx) >>testtry
190    echo "RC=$?" >>testtry
191    
192  echo "---------------------------- Test 31 -----------------------------" >>testtry  echo "---------------------------- Test 31 -----------------------------" >>testtry
193  (cd $srcdir; $valgrind $pcregrep -inA3 'pattern' ./testdata/grepinput ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -inA3 'pattern' ./testdata/grepinput ./testdata/grepinputx) >>testtry
194    echo "RC=$?" >>testtry
195    
196  echo "---------------------------- Test 32 -----------------------------" >>testtry  echo "---------------------------- Test 32 -----------------------------" >>testtry
197  (cd $srcdir; $valgrind $pcregrep -L 'fox' ./testdata/grepinput ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -L 'fox' ./testdata/grepinput ./testdata/grepinputx) >>testtry
198    echo "RC=$?" >>testtry
199    
200  echo "---------------------------- Test 33 -----------------------------" >>testtry  echo "---------------------------- Test 33 -----------------------------" >>testtry
201  (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 206  echo "---------------------------- Test
206  echo "RC=$?" >>testtry  echo "RC=$?" >>testtry
207    
208  echo "---------------------------- Test 35 -----------------------------" >>testtry  echo "---------------------------- Test 35 -----------------------------" >>testtry
209  (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
210  echo "RC=$?" >>testtry  echo "RC=$?" >>testtry
211    
212  echo "---------------------------- Test 36 -----------------------------" >>testtry  echo "---------------------------- Test 36 -----------------------------" >>testtry
# Line 172  cat teststderr >>testtry Line 221  cat teststderr >>testtry
221    
222  echo "---------------------------- Test 38 ------------------------------" >>testtry  echo "---------------------------- Test 38 ------------------------------" >>testtry
223  (cd $srcdir; $valgrind $pcregrep '>\x00<' ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep '>\x00<' ./testdata/grepinput) >>testtry
224    echo "RC=$?" >>testtry
225    
226  echo "---------------------------- Test 39 ------------------------------" >>testtry  echo "---------------------------- Test 39 ------------------------------" >>testtry
227  (cd $srcdir; $valgrind $pcregrep -A1 'before the binary zero' ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep -A1 'before the binary zero' ./testdata/grepinput) >>testtry
228    echo "RC=$?" >>testtry
229    
230  echo "---------------------------- Test 40 ------------------------------" >>testtry  echo "---------------------------- Test 40 ------------------------------" >>testtry
231  (cd $srcdir; $valgrind $pcregrep -B1 'after the binary zero' ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep -B1 'after the binary zero' ./testdata/grepinput) >>testtry
232    echo "RC=$?" >>testtry
233    
234  echo "---------------------------- Test 41 ------------------------------" >>testtry  echo "---------------------------- Test 41 ------------------------------" >>testtry
235  (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
236    echo "RC=$?" >>testtry
237    
238  echo "---------------------------- Test 41 ------------------------------" >>testtry  echo "---------------------------- Test 42 ------------------------------" >>testtry
239  (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
240    echo "RC=$?" >>testtry
241    
242  echo "---------------------------- Test 42 ------------------------------" >>testtry  echo "---------------------------- Test 43 ------------------------------" >>testtry
243  (cd $srcdir; $valgrind $pcregrep -on 'before|zero|after' ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep -on 'before|zero|after' ./testdata/grepinput) >>testtry
244    echo "RC=$?" >>testtry
245    
246  echo "---------------------------- Test 43 ------------------------------" >>testtry  echo "---------------------------- Test 44 ------------------------------" >>testtry
247  (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
248    echo "RC=$?" >>testtry
249    
250  echo "---------------------------- Test 44 ------------------------------" >>testtry  echo "---------------------------- Test 45 ------------------------------" >>testtry
251  (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
252    echo "RC=$?" >>testtry
253    
254  echo "---------------------------- Test 45 ------------------------------" >>testtry  echo "---------------------------- Test 46 ------------------------------" >>testtry
255  (cd $srcdir; $valgrind $pcregrep -eabc -e '(unclosed' ./testdata/grepinput) 2>>testtry >>testtry  (cd $srcdir; $valgrind $pcregrep -eabc -e '(unclosed' ./testdata/grepinput) 2>>testtry >>testtry
256    echo "RC=$?" >>testtry
257    
258  echo "---------------------------- Test 46 ------------------------------" >>testtry  echo "---------------------------- Test 47 ------------------------------" >>testtry
259  (cd $srcdir; $valgrind $pcregrep -Fx "AB.VE  (cd $srcdir; $valgrind $pcregrep -Fx "AB.VE
260  elephant" ./testdata/grepinput) >>testtry  elephant" ./testdata/grepinput) >>testtry
261    echo "RC=$?" >>testtry
262    
263  echo "---------------------------- Test 47 ------------------------------" >>testtry  echo "---------------------------- Test 48 ------------------------------" >>testtry
264  (cd $srcdir; $valgrind $pcregrep -F "AB.VE  (cd $srcdir; $valgrind $pcregrep -F "AB.VE
265  elephant" ./testdata/grepinput) >>testtry  elephant" ./testdata/grepinput) >>testtry
266    echo "RC=$?" >>testtry
267    
268  echo "---------------------------- Test 48 ------------------------------" >>testtry  echo "---------------------------- Test 49 ------------------------------" >>testtry
269  (cd $srcdir; $valgrind $pcregrep -F -e DATA -e "AB.VE  (cd $srcdir; $valgrind $pcregrep -F -e DATA -e "AB.VE
270  elephant" ./testdata/grepinput) >>testtry  elephant" ./testdata/grepinput) >>testtry
271    echo "RC=$?" >>testtry
272    
273  echo "---------------------------- Test 49 ------------------------------" >>testtry  echo "---------------------------- Test 50 ------------------------------" >>testtry
274  (cd $srcdir; $valgrind $pcregrep "^(abc|def|ghi|jkl)" ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep "^(abc|def|ghi|jkl)" ./testdata/grepinputx) >>testtry
275    echo "RC=$?" >>testtry
276    
277  echo "---------------------------- Test 50 ------------------------------" >>testtry  echo "---------------------------- Test 51 ------------------------------" >>testtry
278  (cd $srcdir; $valgrind $pcregrep -Mv "brown\sfox" ./testdata/grepinputv) >>testtry  (cd $srcdir; $valgrind $pcregrep -Mv "brown\sfox" ./testdata/grepinputv) >>testtry
279    echo "RC=$?" >>testtry
280    
281  echo "---------------------------- Test 51 ------------------------------" >>testtry  echo "---------------------------- Test 52 ------------------------------" >>testtry
282  (cd $srcdir; $valgrind $pcregrep --colour=always jumps ./testdata/grepinputv) >>testtry  (cd $srcdir; $valgrind $pcregrep --colour=always jumps ./testdata/grepinputv) >>testtry
283    echo "RC=$?" >>testtry
284    
285  echo "---------------------------- Test 52 ------------------------------" >>testtry  echo "---------------------------- Test 53 ------------------------------" >>testtry
286  (cd $srcdir; $valgrind $pcregrep --file-offsets 'before|zero|after' ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep --file-offsets 'before|zero|after' ./testdata/grepinput) >>testtry
287    echo "RC=$?" >>testtry
288    
289  echo "---------------------------- Test 53 ------------------------------" >>testtry  echo "---------------------------- Test 54 ------------------------------" >>testtry
290  (cd $srcdir; $valgrind $pcregrep --line-offsets 'before|zero|after' ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep --line-offsets 'before|zero|after' ./testdata/grepinput) >>testtry
291    echo "RC=$?" >>testtry
292    
293  echo "---------------------------- Test 54 -----------------------------" >>testtry  echo "---------------------------- Test 55 -----------------------------" >>testtry
294  (cd $srcdir; $valgrind $pcregrep -f./testdata/greplist --color=always ./testdata/grepinputx) >>testtry  (cd $srcdir; $valgrind $pcregrep -f./testdata/greplist --color=always ./testdata/grepinputx) >>testtry
295    echo "RC=$?" >>testtry
296    
297  echo "---------------------------- Test 55 -----------------------------" >>testtry  echo "---------------------------- Test 56 -----------------------------" >>testtry
298  (cd $srcdir; $valgrind $pcregrep -c lazy ./testdata/grepinput*) >>testtry  (cd $srcdir; $valgrind $pcregrep -c lazy ./testdata/grepinput*) >>testtry
299    echo "RC=$?" >>testtry
300    
301  echo "---------------------------- Test 56 -----------------------------" >>testtry  echo "---------------------------- Test 57 -----------------------------" >>testtry
302  (cd $srcdir; $valgrind $pcregrep -c -l lazy ./testdata/grepinput*) >>testtry  (cd $srcdir; $valgrind $pcregrep -c -l lazy ./testdata/grepinput*) >>testtry
303    echo "RC=$?" >>testtry
304    
305  echo "---------------------------- Test 57 -----------------------------" >>testtry  echo "---------------------------- Test 58 -----------------------------" >>testtry
306  (cd $srcdir; $valgrind $pcregrep --regex=PATTERN ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep --regex=PATTERN ./testdata/grepinput) >>testtry
307    echo "RC=$?" >>testtry
308    
309  echo "---------------------------- Test 58 -----------------------------" >>testtry  echo "---------------------------- Test 59 -----------------------------" >>testtry
310  (cd $srcdir; $valgrind $pcregrep --regexp=PATTERN ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep --regexp=PATTERN ./testdata/grepinput) >>testtry
311    echo "RC=$?" >>testtry
312    
313  echo "---------------------------- Test 59 -----------------------------" >>testtry  echo "---------------------------- Test 60 -----------------------------" >>testtry
314  (cd $srcdir; $valgrind $pcregrep --regex PATTERN ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep --regex PATTERN ./testdata/grepinput) >>testtry
315    echo "RC=$?" >>testtry
316    
317  echo "---------------------------- Test 60 -----------------------------" >>testtry  echo "---------------------------- Test 61 -----------------------------" >>testtry
318  (cd $srcdir; $valgrind $pcregrep --regexp PATTERN ./testdata/grepinput) >>testtry  (cd $srcdir; $valgrind $pcregrep --regexp PATTERN ./testdata/grepinput) >>testtry
319    echo "RC=$?" >>testtry
320    
321    echo "---------------------------- 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
323    echo "RC=$?" >>testtry
324    
325    echo "---------------------------- 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
327    echo "RC=$?" >>testtry
328    
329    echo "---------------------------- Test 64 ------------------------------" >>testtry
330    (cd $srcdir; $valgrind $pcregrep -o1 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtry
331    echo "RC=$?" >>testtry
332    
333    echo "---------------------------- Test 65 ------------------------------" >>testtry
334    (cd $srcdir; $valgrind $pcregrep -o2 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtry
335    echo "RC=$?" >>testtry
336    
337    echo "---------------------------- Test 66 ------------------------------" >>testtry
338    (cd $srcdir; $valgrind $pcregrep -o3 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtry
339    echo "RC=$?" >>testtry
340    
341    echo "---------------------------- Test 67 ------------------------------" >>testtry
342    (cd $srcdir; $valgrind $pcregrep -o12 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtry
343    echo "RC=$?" >>testtry
344    
345    echo "---------------------------- Test 68 ------------------------------" >>testtry
346    (cd $srcdir; $valgrind $pcregrep --only-matching=2 '(?<=PAT)TERN (ap(pear)s)' ./testdata/grepinput) >>testtry
347    echo "RC=$?" >>testtry
348    
349    echo "---------------------------- Test 69 -----------------------------" >>testtry
350    (cd $srcdir; $valgrind $pcregrep -vn --colour=always pattern ./testdata/grepinputx) >>testtry
351    echo "RC=$?" >>testtry
352    
353    echo "---------------------------- Test 70 -----------------------------" >>testtry
354    (cd $srcdir; $valgrind $pcregrep --color=always -M "triple:\t.*\n\n" ./testdata/grepinput3) >>testtry
355    echo "RC=$?" >>testtry
356    
357    echo "---------------------------- Test 71 -----------------------------" >>testtry
358    (cd $srcdir; $valgrind $pcregrep -o "^01|^02|^03" ./testdata/grepinput) >>testtry
359    echo "RC=$?" >>testtry
360    
361    echo "---------------------------- Test 72 -----------------------------" >>testtry
362    (cd $srcdir; $valgrind $pcregrep --color=always "^01|^02|^03" ./testdata/grepinput) >>testtry
363    echo "RC=$?" >>testtry
364    
365    echo "---------------------------- Test 73 -----------------------------" >>testtry
366    (cd $srcdir; $valgrind $pcregrep -o --colour=always "^01|^02|^03" ./testdata/grepinput) >>testtry
367    echo "RC=$?" >>testtry
368    
369    echo "---------------------------- Test 74 -----------------------------" >>testtry
370    (cd $srcdir; $valgrind $pcregrep -o "^01|02|^03" ./testdata/grepinput) >>testtry
371    echo "RC=$?" >>testtry
372    
373    echo "---------------------------- Test 75 -----------------------------" >>testtry
374    (cd $srcdir; $valgrind $pcregrep --color=always "^01|02|^03" ./testdata/grepinput) >>testtry
375    echo "RC=$?" >>testtry
376    
377    echo "---------------------------- Test 76 -----------------------------" >>testtry
378    (cd $srcdir; $valgrind $pcregrep -o --colour=always "^01|02|^03" ./testdata/grepinput) >>testtry
379    echo "RC=$?" >>testtry
380    
381    echo "---------------------------- Test 77 -----------------------------" >>testtry
382    (cd $srcdir; $valgrind $pcregrep -o "^01|^02|03" ./testdata/grepinput) >>testtry
383    echo "RC=$?" >>testtry
384    
385    echo "---------------------------- Test 78 -----------------------------" >>testtry
386    (cd $srcdir; $valgrind $pcregrep --color=always "^01|^02|03" ./testdata/grepinput) >>testtry
387    echo "RC=$?" >>testtry
388    
389    echo "---------------------------- Test 79 -----------------------------" >>testtry
390    (cd $srcdir; $valgrind $pcregrep -o --colour=always "^01|^02|03" ./testdata/grepinput) >>testtry
391    echo "RC=$?" >>testtry
392    
393    echo "---------------------------- Test 80 -----------------------------" >>testtry
394    (cd $srcdir; $valgrind $pcregrep -o "\b01|\b02" ./testdata/grepinput) >>testtry
395    echo "RC=$?" >>testtry
396    
397    echo "---------------------------- Test 81 -----------------------------" >>testtry
398    (cd $srcdir; $valgrind $pcregrep --color=always "\\b01|\\b02" ./testdata/grepinput) >>testtry
399    echo "RC=$?" >>testtry
400    
401    echo "---------------------------- Test 82 -----------------------------" >>testtry
402    (cd $srcdir; $valgrind $pcregrep -o --colour=always "\\b01|\\b02" ./testdata/grepinput) >>testtry
403    echo "RC=$?" >>testtry
404    
405    echo "---------------------------- Test 83 -----------------------------" >>testtry
406    (cd $srcdir; $valgrind $pcregrep --buffer-size=100 "^a" ./testdata/grepinput3) >>testtry 2>&1
407    echo "RC=$?" >>testtry
408    
409  # Now compare the results.  # Now compare the results.
410    
# Line 258  if [ $utf8 -ne 0 ] ; then Line 419  if [ $utf8 -ne 0 ] ; then
419    
420    echo "---------------------------- Test U1 ------------------------------" >testtry    echo "---------------------------- Test U1 ------------------------------" >testtry
421    (cd $srcdir; $valgrind $pcregrep -n -u --newline=any "^X" ./testdata/grepinput8) >>testtry    (cd $srcdir; $valgrind $pcregrep -n -u --newline=any "^X" ./testdata/grepinput8) >>testtry
422      echo "RC=$?" >>testtry
423    
424    echo "---------------------------- Test U2 ------------------------------" >>testtry    echo "---------------------------- Test U2 ------------------------------" >>testtry
425    (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
426      echo "RC=$?" >>testtry
427    
428    $cf $srcdir/testdata/grepoutput8 testtry    $cf $srcdir/testdata/grepoutput8 testtry
429    if [ $? != 0 ] ; then exit 1; fi    if [ $? != 0 ] ; then exit 1; fi

Legend:
Removed from v.437  
changed lines
  Added in v.836

webmaster@exim.org
ViewVC Help
Powered by ViewVC 1.1.12