diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2010-11-25 08:18:26 +0100 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2010-11-25 08:18:26 +0100 |
commit | 793d78130ba808ee688c8b7139a2bc6180b29534 (patch) | |
tree | 465ba7cab4eef1a56ed157e35e8fa20a155b4213 /test/test.d/db-remove.sh | |
parent | 5f72b8029c07f3357014d8716f18f21ce649c98a (diff) |
Split tests into several files
* tests can be run seperatly
* runTest will run all tests that have the x bit set
Diffstat (limited to 'test/test.d/db-remove.sh')
-rwxr-xr-x | test/test.d/db-remove.sh | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/test/test.d/db-remove.sh b/test/test.d/db-remove.sh new file mode 100755 index 0000000..b66466d --- /dev/null +++ b/test/test.d/db-remove.sh @@ -0,0 +1,52 @@ +#!/bin/bash + +curdir=$(readlink -e $(dirname $0)) +. "${curdir}/../lib/common.inc" + +testRemovePackages() { + local arches=('i686' 'x86_64') + local pkgs=('pkg-simple-a' 'pkg-simple-b' 'pkg-split-a' 'pkg-split-b') + local pkgbase + local arch + + for pkgbase in ${pkgs[@]}; do + for arch in ${arches[@]}; do + releasePackage extra ${pkgbase} ${arch} + done + done + + ../db-update + + for pkgbase in ${pkgs[@]}; do + for arch in ${arches[@]}; do + ../db-remove ${pkgbase} extra ${arch} + done + 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 + + for pkgbase in ${pkgs[@]}; do + releasePackage extra ${pkgbase} any + done + + ../db-update + + for pkgbase in ${pkgs[@]}; do + ../db-remove ${pkgbase} extra any + done + + for pkgbase in ${pkgs[@]}; do + checkRemovedAnyPackage extra ${pkgbase} + done +} + +. "${curdir}/../lib/shunit2" |