aboutsummaryrefslogtreecommitdiff
path: root/test_pbuilder-checkparams
diff options
context:
space:
mode:
Diffstat (limited to 'test_pbuilder-checkparams')
-rwxr-xr-xtest_pbuilder-checkparams24
1 files changed, 24 insertions, 0 deletions
diff --git a/test_pbuilder-checkparams b/test_pbuilder-checkparams
new file mode 100755
index 0000000..17392d4
--- /dev/null
+++ b/test_pbuilder-checkparams
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+. ./testlib.sh
+
+# testsuite for pbuilder-checkparams
+
+test_debuildopts() {
+ # stderr is redirected to /dev/null to avoid failing if ~/.pbuilderrc is
+ # missing (this outputs a warning which is not expected in the output)
+ . ./pbuilder-checkparams 2>/dev/null
+ 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