| 1 |
#!/bin/bash |
| 2 |
|
| 3 |
# testsuite for pbuilder-checkparams |
| 4 |
|
| 5 |
TD="$(dirname "$0")" |
| 6 |
. "$TD/testlib.sh" |
| 7 |
if [ -n "$PBUILDER_CHECKOUT" ]; then |
| 8 |
PBUILDER_CHECKPARAMS="$PBUILDER_CHECKOUT/pbuilder-checkparams" |
| 9 |
else |
| 10 |
PBUILDER_CHECKPARAMS="$PBUILDER_TEST_PKGLIBDIR/pbuilder-checkparams" |
| 11 |
fi |
| 12 |
|
| 13 |
# setup a fake installed environment |
| 14 |
trap testlib_cleanup_env sigpipe sighup exit |
| 15 |
testlib_setup_env |
| 16 |
|
| 17 |
test_debuildopts() { |
| 18 |
. "$PBUILDER_CHECKPARAMS" |
| 19 |
echo "$DEBBUILDOPTS" |
| 20 |
} |
| 21 |
|
| 22 |
expect_output "" \ |
| 23 |
test_debuildopts foo.dsc |
| 24 |
expect_output "" \ |
| 25 |
test_debuildopts --debbuildopts "" foo.dsc |
| 26 |
expect_output "-v1.0 -efoo" \ |
| 27 |
test_debuildopts --debbuildopts "-v1.0 -efoo" foo.dsc |
| 28 |
expect_output "-v1.0 -efoo" \ |
| 29 |
test_debuildopts --debbuildopts -v1.0 --debbuildopts -efoo foo.dsc |
| 30 |
expect_output "-efoo" \ |
| 31 |
test_debuildopts --debbuildopts -v1.0 --debbuildopts "" --debbuildopts -efoo foo.dsc |
| 32 |
|
| 33 |
testlib_summary |