aboutsummaryrefslogtreecommitdiff
path: root/test_pbuilder-checkparams
blob: d26dd669cd5595b9316e2b6a163801c2425a5842 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/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
    echo "$DEBBUILDOPTS"
}

# setup a fake installed environment
trap testlib_cleanup_env sigpipe sighup exit
testlib_setup_env

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