X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/d7a4635391d9ff36152603ab6faa6eafa206750a..62600666d21aacea63cece3b4ec64f0ffb40168b:/test/integration/test-bug-612958-use-dpkg-multiarch-config diff --git a/test/integration/test-bug-612958-use-dpkg-multiarch-config b/test/integration/test-bug-612958-use-dpkg-multiarch-config index 4d1f00ca0..54200ff23 100755 --- a/test/integration/test-bug-612958-use-dpkg-multiarch-config +++ b/test/integration/test-bug-612958-use-dpkg-multiarch-config @@ -1,26 +1,23 @@ #!/bin/sh set -e -TESTDIR=$(readlink -f $(dirname $0)) -. $TESTDIR/framework +TESTDIR="$(readlink -f "$(dirname "$0")")" +. "$TESTDIR/framework" setupenvironment configarchitecture 'i386' -setupaptarchive - -insertinstalledpackage 'libapt' 'i386' '1.0' -insertinstalledpackage 'libapt' 'amd64' '1.0' -insertinstalledpackage 'libapt' 'armel' '1.0' testpass() { - rm rootdir/var/cache/apt/*.bin - msgtest 'Test architecture handling' "$1 with $2" - testsuccess --nomsg aptcache show libapt:$2 + msgtest 'Test architecture handling success' "$1 with $2" + rm -f archs.conf + aptconfig dump --no-empty --format='%V%n' APT::Architectures > archs.conf + testsuccess --nomsg grep "^$2\$" archs.conf } testfail() { - rm rootdir/var/cache/apt/*.bin - msgtest 'Test architecture handling' "$1 with $2" - testfailure --nomsg aptcache show libapt:$2 + msgtest 'Test architecture handling failure' "$1 with $2" + rm -f archs.conf + aptconfig dump --no-empty --format='%V%n' APT::Architectures > archs.conf + testfailure --nomsg grep "^$2\$" archs.conf } testpass 'no config' 'i386' @@ -42,6 +39,15 @@ testpass 'apt config' 'armel' rm $CONFFILE +echo '#clear APT::Architectures;' >> $CONFFILE +echo 'APT::Architectures "i386,amd64";' >> $CONFFILE + +testpass 'apt config' 'i386' +testpass 'apt config' 'amd64' +testfail 'apt config' 'armel' + +rm $CONFFILE + echo '#clear APT::Architectures;' >> $CONFFILE echo 'Dir::Bin::dpkg "./dpkg-printer";' >> $CONFFILE