summaryrefslogtreecommitdiff
path: root/test/integration/framework
diff options
context:
space:
mode:
authorMichael Vogt <mvo@debian.org>2010-10-01 15:55:10 +0200
committerMichael Vogt <mvo@debian.org>2010-10-01 15:55:10 +0200
commit6774b53da5215ae1c3ebe6a3fff496d61cd779f7 (patch)
tree02b9ad23d717bae4d04d85bf0c9c676a52920d53 /test/integration/framework
parentffde0f7df221d65c698907066591ea425e0b1339 (diff)
parent63cb76531aa8daca9f1da02a1f3249f5badbc507 (diff)
merged 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 59d2f0e85..c09afcbad 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
+}