diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2011-02-03 23:25:41 +0100 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2011-02-03 23:25:41 +0100 |
commit | 87bc1c45de94da47587d8e0314e9087f33a2b89e (patch) | |
tree | 049f131e5fcbc8cc402ed4e5b49f1e61723f297b /test/integration | |
parent | 5cf733e18af40fbed978ec84e60ccd0ffc1871d8 (diff) |
check that the right amount of packages is installed if multiple passed in
Diffstat (limited to 'test/integration')
-rw-r--r-- | test/integration/framework | 6 | ||||
-rwxr-xr-x | test/integration/test-autoremove | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/test/integration/framework b/test/integration/framework index e79d312ca..3aa80db23 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -623,8 +623,8 @@ testnopackage() { 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 + local PKGS="$(dpkg -l $* | grep '^i' | wc -l)" + if [ "$PKGS" != $# ]; then echo $PKGS dpkg -l $* | grep '^[a-z]' msgfail @@ -635,7 +635,7 @@ testdpkginstalled() { testdpkgnotinstalled() { msgtest "Test for correctly not-installed package(s) with" "dpkg -l $*" - local PKGS="$(dpkg -l $* 2> /dev/null | grep '^[a-z]' | grep '^[^u]' | wc -l)" + local PKGS="$(dpkg -l $* 2> /dev/null | grep '^i' | wc -l)" if [ "$PKGS" != 0 ]; then echo dpkg -l $* | grep '^[a-z]' diff --git a/test/integration/test-autoremove b/test/integration/test-autoremove index f1ce4e9e7..9dfab19f5 100755 --- a/test/integration/test-autoremove +++ b/test/integration/test-autoremove @@ -20,7 +20,7 @@ Auto-Installed: 1 ' aptget remove debhelper -y -qq 2>&1 > /dev/null testdpkgnotinstalled 'debhelper' -testdpkginstalled 'po-debconf unrelated' +testdpkginstalled 'po-debconf' 'unrelated' echo 'APT::NeverAutoRemove { "^debc.*nf$"; };' > rootdir/etc/apt/apt.conf.d/00autoremove testequal 'Reading package lists... |