From 72075b8430b826d7dd489765c1004e4161479fa2 Mon Sep 17 00:00:00 2001 From: Mattia Rizzolo Date: Tue, 13 Oct 2015 10:26:06 +0000 Subject: move all tests under a t/ directory --- t/test_pbuilder-checkparams | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 t/test_pbuilder-checkparams (limited to 't/test_pbuilder-checkparams') diff --git a/t/test_pbuilder-checkparams b/t/test_pbuilder-checkparams new file mode 100755 index 0000000..a81ae8d --- /dev/null +++ b/t/test_pbuilder-checkparams @@ -0,0 +1,34 @@ +#!/bin/bash + +# testsuite for pbuilder-checkparams + +TD="$(dirname "$0")" +if [ -n "$PBUILDER_CHECKOUT" ]; then + . "$TD/testlib.sh" + PBUILDER_CHECKPARAMS="$PBUILDER_CHECKOUT/pbuilder-checkparams" +else + . "$TD/testlib.sh" + PBUILDER_CHECKPARAMS="$PBUILDER_TEST_PKGLIBDIR/pbuilder-checkparams" +fi + +# setup a fake installed environment +trap testlib_cleanup_env sigpipe sighup exit +testlib_setup_env + +test_debuildopts() { + . "$PBUILDER_CHECKPARAMS" + echo "$DEBBUILDOPTS" +} + +expect_output "" \ + test_debuildopts foo.dsc +expect_output "" \ + test_debuildopts --debbuildopts "" foo.dsc +expect_output "-v1.0 -efoo" \ + test_debuildopts --debbuildopts "-v1.0 -efoo" foo.dsc +expect_output "-v1.0 -efoo" \ + test_debuildopts --debbuildopts -v1.0 --debbuildopts -efoo foo.dsc +expect_output "-efoo" \ + test_debuildopts --debbuildopts -v1.0 --debbuildopts "" --debbuildopts -efoo foo.dsc + +testlib_summary -- cgit v1.2.3