diff options
author | Michael Vogt <mvo@debian.org> | 2011-02-14 12:05:35 +0100 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2011-02-14 12:05:35 +0100 |
commit | 1fc07a44e8191e00fc1566bfc15e8b370da77330 (patch) | |
tree | 94603cf04d736dc500130389f2ef5ba4b027c8bc /test/integration/framework | |
parent | 1dda80929fcd62c287a84f1ecc1277fc39890efe (diff) | |
parent | 2cae0ccb49efbeebe33f364b61e639ebf2639bdd (diff) |
merged from lp:~donkult/apt/sid
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 121678d4b..7e1d25e61 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 +} |