| 1 |
if test "$redirect_stdin" = no; then |
| 2 |
cppi $options $t.I > $t.O 2> $t.e |
| 3 |
else |
| 4 |
cppi $options - < $t.I > $t.O 2> $t.e |
| 5 |
fi |
| 6 |
status=$? |
| 7 |
|
| 8 |
fail=0 |
| 9 |
if test $status != $expected_status; then |
| 10 |
echo "unexpected return status: got $status; expected $expected_status" |
| 11 |
fail=1 |
| 12 |
fi |
| 13 |
|
| 14 |
if cmp -s $t.O $t.EO; then |
| 15 |
: |
| 16 |
else |
| 17 |
echo "unexpected results on standard output" |
| 18 |
echo "compare the output files (expected actual): $t.EO $t.O" |
| 19 |
fail=1 |
| 20 |
fi |
| 21 |
|
| 22 |
if cmp -s $t.e $t.Ee; then |
| 23 |
: |
| 24 |
else |
| 25 |
echo "unexpected results on standard error" |
| 26 |
echo "compare the error files (expected actual): $t.Ee $t.e" |
| 27 |
fail=1 |
| 28 |
fi |
| 29 |
|
| 30 |
test $fail = 0 && rm -f $t.I $t.O $t.e $t.EO $t.Ee $extra_temps |
| 31 |
exit $fail |