diff options
author | Michael Vogt <michael.vogt@ubuntu.com> | 2010-10-01 15:47:34 +0200 |
---|---|---|
committer | Michael Vogt <michael.vogt@ubuntu.com> | 2010-10-01 15:47:34 +0200 |
commit | ebd21427926418a01739baca2ee3426c103ff83a (patch) | |
tree | a44b2d70ca085e8500f92555a0e5ba79f797febc /test/integration/framework | |
parent | 7e1d0a91891ae79facf30ca058557b6e45650f31 (diff) |
cherry pick fix -r 2028 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 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 +} |