diff options
author | Michael Vogt <mvo@debian.org> | 2010-10-01 15:55:10 +0200 |
---|---|---|
committer | Michael Vogt <mvo@debian.org> | 2010-10-01 15:55:10 +0200 |
commit | 6774b53da5215ae1c3ebe6a3fff496d61cd779f7 (patch) | |
tree | 02b9ad23d717bae4d04d85bf0c9c676a52920d53 /test/integration/framework | |
parent | ffde0f7df221d65c698907066591ea425e0b1339 (diff) | |
parent | 63cb76531aa8daca9f1da02a1f3249f5badbc507 (diff) |
merged from lp:~donkult/apt/sid
Diffstat (limited to 'test/integration/framework')
-rw-r--r-- | test/integration/framework | 24 |
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 +} |