3 |
# This file is generated by configure from RunGrepTest.in. Make any changes |
# This file is generated by configure from RunGrepTest.in. Make any changes |
4 |
# to that file. |
# to that file. |
5 |
|
|
6 |
|
# Set the C locale, so that sort(1) behaves predictably. |
7 |
|
LC_ALL=C |
8 |
|
export LC_ALL |
9 |
|
|
10 |
echo "Testing pcregrep" |
echo "Testing pcregrep" |
11 |
./pcregrep -V |
./pcregrep -V |
12 |
|
|
14 |
# itself. What we are checking here is the file handling and options that are |
# itself. What we are checking here is the file handling and options that are |
15 |
# supported by pcregrep. |
# supported by pcregrep. |
16 |
|
|
17 |
cf=diff |
cf="diff -u" |
18 |
valgrind= |
valgrind= |
19 |
if [ ! -d testdata ] ; then |
if [ ! -d testdata ] ; then |
20 |
ln -s @top_srcdir@/testdata testdata |
ln -s @top_srcdir@/testdata testdata |
23 |
|
|
24 |
while [ $# -gt 0 ] ; do |
while [ $# -gt 0 ] ; do |
25 |
case $1 in |
case $1 in |
26 |
valgrind) valgrind="valgrind -q --leak-check=no";; |
valgrind) valgrind="valgrind -q --leak-check=no";; |
27 |
*) echo "Unknown argument $1"; exit 1;; |
*) echo "Unknown argument $1"; exit 1;; |
28 |
esac |
esac |
29 |
shift |
shift |
131 |
$valgrind ./pcregrep -L 'fox' $testdata/grepinput $testdata/grepinputx >>testtry |
$valgrind ./pcregrep -L 'fox' $testdata/grepinput $testdata/grepinputx >>testtry |
132 |
|
|
133 |
echo "---------------------------- Test 33 -----------------------------" >>testtry |
echo "---------------------------- Test 33 -----------------------------" >>testtry |
134 |
$valgrind ./pcregrep 'fox' $testdata/grepnonexist >>testtry 2>&1 |
$valgrind ./pcregrep 'fox' $testdata/grepnonexist >>testtry 2>&1 |
135 |
echo "RC=$?" >>testtry |
echo "RC=$?" >>testtry |
136 |
|
|
137 |
echo "---------------------------- Test 34 -----------------------------" >>testtry |
echo "---------------------------- Test 34 -----------------------------" >>testtry |
138 |
$valgrind ./pcregrep -s 'fox' $testdata/grepnonexist >>testtry 2>&1 |
$valgrind ./pcregrep -s 'fox' $testdata/grepnonexist >>testtry 2>&1 |
139 |
echo "RC=$?" >>testtry |
echo "RC=$?" >>testtry |
140 |
|
|
141 |
echo "---------------------------- Test 35 -----------------------------" >>testtry |
echo "---------------------------- Test 35 -----------------------------" >>testtry |
142 |
$valgrind ./pcregrep -L -r --include=grepinputx 'fox' $testdata >>testtry |
$valgrind ./pcregrep -L -r --include=grepinputx 'fox' $testdata >>testtry |
143 |
echo "RC=$?" >>testtry |
echo "RC=$?" >>testtry |
144 |
|
|
145 |
echo "---------------------------- Test 36 -----------------------------" >>testtry |
echo "---------------------------- Test 36 -----------------------------" >>testtry |
146 |
$valgrind ./pcregrep -L -r --include=grepinput --exclude 'grepinput$' 'fox' $testdata >>testtry |
$valgrind ./pcregrep -L -r --include=grepinput --exclude 'grepinput$' 'fox' $testdata | sort >>testtry |
147 |
echo "RC=$?" >>testtry |
echo "RC=$?" >>testtry |
148 |
|
|
149 |
echo "---------------------------- Test 37 -----------------------------" >>testtry |
echo "---------------------------- Test 37 -----------------------------" >>testtry |
201 |
$valgrind ./pcregrep --newline=crlf "^(abc|def|ghi|jkl)" $testdata/grepinputx >>testtry |
$valgrind ./pcregrep --newline=crlf "^(abc|def|ghi|jkl)" $testdata/grepinputx >>testtry |
202 |
|
|
203 |
echo "---------------------------- Test 52 ------------------------------" >>testtry |
echo "---------------------------- Test 52 ------------------------------" >>testtry |
204 |
$valgrind ./pcregrep --newline=cr -F "def
jkl" $testdata/grepinputx >>testtry |
pattern=`printf 'def\rjkl'` |
205 |
|
$valgrind ./pcregrep --newline=cr -F "$pattern" $testdata/grepinputx >>testtry |
206 |
|
|
207 |
echo "---------------------------- Test 53 ------------------------------" >>testtry |
echo "---------------------------- Test 53 ------------------------------" >>testtry |
208 |
$valgrind ./pcregrep --newline=crlf -F "xxx |
pattern=`printf 'xxx\r\njkl'` |
209 |
jkl" $testdata/grepinputx >>testtry |
$valgrind ./pcregrep --newline=crlf -F "$pattern" $testdata/grepinputx >>testtry |
210 |
|
|
211 |
echo "---------------------------- Test 54 ------------------------------" >>testtry |
echo "---------------------------- Test 54 ------------------------------" >>testtry |
212 |
$valgrind ./pcregrep -n --newline=any "^(abc|def|ghi|jkl)" $testdata/grepinputx >>testtry |
$valgrind ./pcregrep -n --newline=any "^(abc|def|ghi|jkl)" $testdata/grepinputx >>testtry |
220 |
|
|
221 |
if [ $no_utf8 -ne 0 ] ; then |
if [ $no_utf8 -ne 0 ] ; then |
222 |
echo "Testing pcregrep UTF-8 features" |
echo "Testing pcregrep UTF-8 features" |
223 |
|
|
224 |
echo "---------------------------- Test U1 ------------------------------" >testtry |
echo "---------------------------- Test U1 ------------------------------" >testtry |
225 |
$valgrind ./pcregrep -n -u --newline=any "^X" $testdata/grepinput8 >>testtry |
$valgrind ./pcregrep -n -u --newline=any "^X" $testdata/grepinput8 >>testtry |
226 |
|
|
234 |
echo "Skipping pcregrep UTF-8 tests: no UTF-8 support in PCRE library" |
echo "Skipping pcregrep UTF-8 tests: no UTF-8 support in PCRE library" |
235 |
fi |
fi |
236 |
|
|
237 |
exit 0 |
exit 0 |
238 |
|
|
239 |
# End |
# End |