]>
Commit | Line | Data |
---|---|---|
081c9d44 DK |
1 | #!/bin/sh |
2 | set -e | |
3 | ||
3abb6a6a DK |
4 | TESTDIR="$(readlink -f "$(dirname "$0")")" |
5 | . "$TESTDIR/framework" | |
081c9d44 DK |
6 | |
7 | setupenvironment | |
8 | configarchitecture 'amd64' | |
9 | ||
10 | testsuccess aptconfig dump | |
25b86db1 | 11 | testsuccessequal 'APT::Architecture "amd64";' aptconfig dump APT::Architecture |
081c9d44 DK |
12 | testempty aptconfig dump config::which::does::not::exist |
13 | ||
25b86db1 | 14 | testsuccessequal 'APT::Architectures ""; |
081c9d44 | 15 | APT::Architectures:: "amd64";' aptconfig dump APT::Architectures |
25b86db1 DK |
16 | testsuccessequal 'APT::Architectures:: "amd64";' aptconfig dump --no-empty APT::Architectures |
17 | testsuccessequal 'amd64' aptconfig dump --no-empty --format='%v%n' APT::Architectures | |
081c9d44 DK |
18 | |
19 | testempty aptconfig shell | |
25b86db1 | 20 | testfailureequal 'E: Arguments not in pairs' aptconfig shell APT::Architecture |
081c9d44 | 21 | testempty aptconfig shell APT::Architecture ARCH # incorrect order |
25b86db1 | 22 | testsuccessequal "ARCH='amd64'" aptconfig shell ARCH APT::Architecture |
081c9d44 DK |
23 | |
24 | ROOTDIR="$(readlink -f rootdir)" | |
25b86db1 DK |
25 | testsuccessequal "CONFIG='apt.conf'" aptconfig shell CONFIG Dir::Etc::main |
26 | testsuccessequal "CONFIG='${ROOTDIR}/etc/apt/apt.conf'" aptconfig shell CONFIG Dir::Etc::main/f | |
8757a0fd | 27 | testsuccessequal "CONFIG='etc/apt'" aptconfig shell CONFIG Dir::Etc |
25b86db1 DK |
28 | testsuccessequal "CONFIG='${ROOTDIR}/etc/apt/'" aptconfig shell CONFIG Dir::Etc/ # old style |
29 | testsuccessequal "CONFIG='${ROOTDIR}/etc/apt/'" aptconfig shell CONFIG Dir::Etc/d | |
081c9d44 DK |
30 | |
31 | testempty aptconfig dump --no-empty --format='%v%n' APT::Build-Profiles | |
32 | export DEB_BUILD_PROFILES='nodoc stage1' | |
25b86db1 | 33 | testsuccessequal 'nodoc |
081c9d44 DK |
34 | stage1' aptconfig dump --no-empty --format='%v%n' APT::Build-Profiles |
35 | unset DEB_BUILD_PROFILES | |
36 | testempty aptconfig dump --no-empty --format='%v%n' APT::Build-Profiles |