#!/bin/sh
set -e
-TESTDIR=$(readlink -f $(dirname $0))
-. $TESTDIR/framework
+TESTDIR="$(readlink -f "$(dirname "$0")")"
+. "$TESTDIR/framework"
setupenvironment
configarchitecture 'amd64' 'i386' 'armel'
setupaptarchive
testsuccessequal 'Reading package lists...
+Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
bar
Conf bar (1.0 unstable [all])' aptget build-dep buildprofiles -s -o APT::Architecture=i386 -P stage1
KEEP='Reading package lists...
+Reading package lists...
Building dependency tree...
The following NEW packages will be installed:
foo
Conf foo (1.0 unstable [all])'
setdrop() {
DROP="Reading package lists...
-Building dependency tree...
$1 has no build depends.
+Reading package lists...
+Building dependency tree...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded."
}
testwithdpkg "$2" "$3" "$4"
}
+testsuccess aptcache gencaches
setdrop 'spec-1'
testprofile 'spec-1' 'foo <!stage1>' '' "$KEEP"
testprofile 'spec-1' 'foo <!stage1>' 'stage1' "$DROP"