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