Browse Source

check that the right amount of packages is installed if multiple passed in

tags/debian/0.8.11
David Kalnischkies 10 years ago
parent
commit
87bc1c45de
2 changed files with 4 additions and 4 deletions
  1. +3
    -3
      test/integration/framework
  2. +1
    -1
      test/integration/test-autoremove

+ 3
- 3
test/integration/framework View File

@@ -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]'


+ 1
- 1
test/integration/test-autoremove View File

@@ -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...


Loading…
Cancel
Save