summaryrefslogtreecommitdiff
path: root/test/integration/framework
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-10-01 15:47:34 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-10-01 15:47:34 +0200
commitebd21427926418a01739baca2ee3426c103ff83a (patch)
treea44b2d70ca085e8500f92555a0e5ba79f797febc /test/integration/framework
parent7e1d0a91891ae79facf30ca058557b6e45650f31 (diff)
cherry pick fix -r 2028 from lp:~donkult/apt/sid
Diffstat (limited to 'test/integration/framework')
-rw-r--r--test/integration/framework24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/integration/framework b/test/integration/framework
index 8a5973d4b..a515ce070 100644
--- a/test/integration/framework
+++ b/test/integration/framework
@@ -499,3 +499,27 @@ testnopackage() {
fi
msgpass
}
+
+testdpkginstalled() {
+ msgtest "Test for correctly installed package(s) with" "dpkg -l $*"
+ local PKGS="$(dpkg -l $* | grep '^[a-z]' | grep '^[^i]' | wc -l)"
+ if [ "$PKGS" != 0 ]; then
+ echo $PKGS
+ dpkg -l $* | grep '^[a-z]'
+ msgfail
+ return 1
+ fi
+ msgpass
+}
+
+testdpkgnoninstalled() {
+ msgtest "Test for correctly non-installed package(s) with" "dpkg -l $*"
+ local PKGS="$(dpkg -l $* | grep '^[a-z]' | grep '^[^u]' | wc -l)"
+ if [ "$PKGS" != 0 ]; then
+ echo
+ dpkg -l $* | grep '^[a-z]'
+ msgfail
+ return 1
+ fi
+ msgpass
+}