diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2011-11-05 16:34:53 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2011-11-05 16:34:53 +0100 |
commit | 6159269bfbb850b2aed25e335fc5d538a2d4de4f (patch) | |
tree | d104a55fd0de24e3bb88023b0c1610ab1891edbd /test | |
parent | ae3ff361863b72d9cd52d9379cda7e7dbe825b15 (diff) | |
download | dbscripts-6159269bfbb850b2aed25e335fc5d538a2d4de4f.tar.gz dbscripts-6159269bfbb850b2aed25e335fc5d538a2d4de4f.tar.xz |
db-remove: support removing multiple packages at once
Diffstat (limited to 'test')
-rwxr-xr-x | test/test.d/db-remove.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/test/test.d/db-remove.sh b/test/test.d/db-remove.sh index 945ca62..416e693 100755 --- a/test/test.d/db-remove.sh +++ b/test/test.d/db-remove.sh @@ -30,6 +30,31 @@ testRemovePackages() { done } +testRemoveMultiplePackages() { + local arches=('i686' 'x86_64') + local pkgs=('pkg-simple-a' 'pkg-simple-b' 'pkg-split-a' 'pkg-split-b' 'pkg-simple-epoch') + local pkgbase + local arch + + for pkgbase in ${pkgs[@]}; do + for arch in ${arches[@]}; do + releasePackage extra ${pkgbase} ${arch} + done + done + + ../db-update + + for arch in ${arches[@]}; do + ../db-remove extra ${arch} ${pkgs[@]} + done + + for pkgbase in ${pkgs[@]}; do + for arch in ${arches[@]}; do + checkRemovedPackage extra ${pkgbase} ${arch} + done + done +} + testRemoveAnyPackages() { local pkgs=('pkg-any-a' 'pkg-any-b') local pkgbase |