| 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 |
|
# Remove any non-default colouring that the caller may have set. |
| 13 |
|
|
| 14 |
|
unset PCREGREP_COLOUR PCREGREP_COLOR |
| 15 |
|
|
| 16 |
|
# Set the program to be tested, and valgrind settings when requested. |
| 17 |
|
|
| 18 |
pcregrep=`pwd`/pcregrep |
pcregrep=`pwd`/pcregrep |
| 19 |
|
|
| 20 |
valgrind= |
valgrind= |
| 35 |
|
|
| 36 |
$pcregrep -V |
$pcregrep -V |
| 37 |
|
|
|
cf="diff -ub" |
|
|
|
|
| 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 |
|
cf="diff -ub" |
| 43 |
if diff -u /dev/null /dev/null; then |
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 |