From a639bca6cc963483eb1627c7e6a1fa0af23ca148 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sun, 12 Oct 2014 13:55:56 +0200 Subject: add new tests; misc Signed-off-by: Florian Pritz --- test/test.d/db-remove.sh | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) (limited to 'test/test.d/db-remove.sh') diff --git a/test/test.d/db-remove.sh b/test/test.d/db-remove.sh index 6905821..f706b7a 100755 --- a/test/test.d/db-remove.sh +++ b/test/test.d/db-remove.sh @@ -20,9 +20,6 @@ testRemovePackages() { for pkgname in ${pkgnames[@]}; do for arch in ${arches[@]}; do - # TODO: removing pkg-split-a/pkg-split-b won't work because - # db-remove only removes single packages, not a group of split - # packages. do we want that? ../db-remove extra ${arch} ${pkgname} done done @@ -56,9 +53,6 @@ testRemoveMultiplePackages() { ../db-update for arch in ${arches[@]}; do - # TODO: removing pkg-split-a/pkg-split-b won't work because - # db-remove only removes single packages, not a group of split - # packages. do we want that? ../db-remove extra ${arch} ${pkgnames[@]} done @@ -94,4 +88,22 @@ testRemoveAnyPackages() { done } +testRemoveSingleArch() { + local pkgs=('pkg-any-a' 'pkg-any-b') + local pkgbase + + for pkgbase in ${pkgs[@]}; do + releasePackage extra ${pkgbase} any + done + + ../db-update + + ../db-remove extra i686 pkg-any-a + + checkRemovedPackage extra pkg-any-a i686 + checkPackage extra pkg-any-a-1-1-any.pkg.tar.xz x86_64 + checkPackage extra pkg-any-b-1-1-any.pkg.tar.xz i686 + checkPackage extra pkg-any-b-1-1-any.pkg.tar.xz x86_64 +} + . "${curdir}/../lib/shunit2" -- cgit v1.2.3-24-g4f1b