25 |
shift |
shift |
26 |
done |
done |
27 |
|
|
28 |
|
./pcretest -C | ./pcregrep "No UTF-8 support" >/dev/null |
29 |
|
no_utf8=$? |
30 |
|
|
31 |
echo "---------------------------- Test 1 ------------------------------" >testtry |
echo "---------------------------- Test 1 ------------------------------" >testtry |
32 |
$valgrind ./pcregrep PATTERN $testdata/grepinput >>testtry |
$valgrind ./pcregrep PATTERN $testdata/grepinput >>testtry |
33 |
|
|
203 |
$valgrind ./pcregrep --newline=crlf -F "xxx |
$valgrind ./pcregrep --newline=crlf -F "xxx |
204 |
jkl" $testdata/grepinputx >>testtry |
jkl" $testdata/grepinputx >>testtry |
205 |
|
|
206 |
|
echo "---------------------------- Test 54 ------------------------------" >>testtry |
207 |
|
$valgrind ./pcregrep -n --newline=any "^(abc|def|ghi|jkl)" $testdata/grepinputx >>testtry |
208 |
|
|
209 |
# Now compare the results. |
# Now compare the results. |
210 |
|
|
211 |
$cf testtry $testdata/grepoutput |
$cf testtry $testdata/grepoutput |
212 |
if [ $? != 0 ] ; then exit 1; else exit 0; fi |
if [ $? != 0 ] ; then exit 1; fi |
213 |
|
|
214 |
|
# These tests require UTF-8 support |
215 |
|
|
216 |
|
if [ $no_utf8 -ne 0 ] ; then |
217 |
|
echo "Testing pcregrep UTF-8 features" |
218 |
|
|
219 |
|
echo "---------------------------- Test U1 ------------------------------" >testtry |
220 |
|
$valgrind ./pcregrep -n -u --newline=any "^X" $testdata/grepinput8 >>testtry |
221 |
|
|
222 |
|
echo "---------------------------- Test U2 ------------------------------" >>testtry |
223 |
|
$valgrind ./pcregrep -n -u -C 3 --newline=any "Match" $testdata/grepinput8 >>testtry |
224 |
|
|
225 |
|
$cf testtry $testdata/grepoutput8 |
226 |
|
if [ $? != 0 ] ; then exit 1; fi |
227 |
|
|
228 |
|
else |
229 |
|
echo "Skipping pcregrep UTF-8 tests: no UTF-8 support in PCRE library" |
230 |
|
fi |
231 |
|
|
232 |
|
exit 0 |
233 |
|
|
234 |
# End |
# End |