summaryrefslogtreecommitdiff
path: root/test/integration/framework
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-02-14 14:07:17 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2011-02-14 14:07:17 +0100
commit8d009e3e8ac6c6431a8bc79a07d9ad7c0295d160 (patch)
tree361496f3f028a8c876c1059fd547b0191237ce67 /test/integration/framework
parent5645e8b1cebb57134df717b8339248811cb762f2 (diff)
parent94244f75f8280c9b4018736d503d17455c284b2d (diff)
merged from debian-sid
Diffstat (limited to 'test/integration/framework')
-rw-r--r--test/integration/framework14
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
+}