diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2011-02-10 18:10:14 +0100 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2011-02-10 18:10:14 +0100 |
commit | ec7f904e7ea1b0b8aaefbbb202ced9e19292dd76 (patch) | |
tree | 7f3daf5fdba5814a1f2ca8671d84f6768266511f /test/integration/framework | |
parent | ef86a8a4204ad579f1ab80f728a22b2ad0d34266 (diff) |
use apt-mark instead of hand-mangling with the extended_states file
Diffstat (limited to 'test/integration/framework')
-rw-r--r-- | test/integration/framework | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/integration/framework b/test/integration/framework index e10709079..11d9a9659 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -79,6 +79,7 @@ aptcache() { runapt apt-cache $*; } aptget() { runapt apt-get $*; } aptftparchive() { runapt apt-ftparchive $*; } aptkey() { runapt apt-key $*; } +aptmark() { runapt apt-mark $*; } dpkg() { $(which dpkg) --root=${TMPWORKINGDIRECTORY}/rootdir --force-not-root --force-bad-path --log=${TMPWORKINGDIRECTORY}/rootdir/var/log/dpkg.log $* } @@ -647,3 +648,16 @@ testdpkgnotinstalled() { fi msgpass } + +testmarkedauto() { + local COMPAREFILE=$(mktemp) + addtrap "rm $COMPAREFILE;" + if [ -n "$1" ]; then + msgtest 'Test for correctly marked as auto-installed' "$*" + while [ -n "$1" ]; do echo "$1"; shift; done | sort > $COMPAREFILE + else + msgtest 'Test for correctly marked as auto-installed' 'no package' + echo > $COMPAREFILE + fi + aptmark showauto 2>&1 | checkdiff $COMPAREFILE - && msgpass || msgfail +} |