diff options
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 +} |