1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 15:58:50 -05:00

Add three clean cache tests

The first two are rather standard tests of our two available clean options,
and the third is attempting to test a reported bug (and failing to make the
given case fail).

Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
Dan McGee 2011-01-29 11:26:48 -06:00
parent 2d5ec02d7c
commit d6a9436143
3 changed files with 68 additions and 0 deletions

View File

@ -0,0 +1,26 @@
self.description = "CleanMethod = KeepInstalled"
sp = pmpkg("dummy", "2.0-1")
self.addpkg2db("sync", sp)
sp = pmpkg("bar", "2.0-1")
self.addpkg2db("sync", sp)
sp = pmpkg("baz", "2.0-1")
self.addpkg2db("sync", sp)
lp = pmpkg("dummy", "1.0-1")
self.addpkg2db("local", lp)
lp = pmpkg("bar", "2.0-1")
self.addpkg2db("local", lp)
self.args = "-Sc"
self.option['CleanMethod'] = ['KeepInstalled']
self.createlocalpkgs = True
self.addrule("PACMAN_RETCODE=0")
self.addrule("!CACHE_EXISTS=dummy|2.0-1")
self.addrule("CACHE_EXISTS=dummy|1.0-1")
self.addrule("CACHE_EXISTS=bar|2.0-1")
self.addrule("!CACHE_EXISTS=baz|2.0-1")

View File

@ -0,0 +1,26 @@
self.description = "CleanMethod = KeepCurrent"
sp = pmpkg("dummy", "2.0-1")
self.addpkg2db("sync", sp)
sp = pmpkg("bar", "2.0-1")
self.addpkg2db("sync", sp)
sp = pmpkg("baz", "2.0-1")
self.addpkg2db("sync", sp)
lp = pmpkg("dummy", "1.0-1")
self.addpkg2db("local", lp)
lp = pmpkg("bar", "2.0-1")
self.addpkg2db("local", lp)
self.args = "-Sc"
self.option['CleanMethod'] = ['KeepCurrent']
self.createlocalpkgs = True
self.addrule("PACMAN_RETCODE=0")
self.addrule("CACHE_EXISTS=dummy|2.0-1")
self.addrule("!CACHE_EXISTS=dummy|1.0-1")
self.addrule("CACHE_EXISTS=bar|2.0-1")
self.addrule("CACHE_EXISTS=baz|2.0-1")

View File

@ -0,0 +1,16 @@
self.description = "CleanMethod = KeepInstalled with IgnorePkg (FS#22653)"
sp = pmpkg("dummy", "2.0-1")
self.addpkg2db("sync", sp)
lp = pmpkg("dummy", "1.0-1")
self.addpkg2db("local", lp)
self.args = "-Sc"
self.option['CleanMethod'] = ['KeepInstalled']
self.option['IgnorePkg'] = ['dummy']
self.createlocalpkgs = True
self.addrule("PACMAN_RETCODE=0")
self.addrule("!CACHE_EXISTS=dummy|2.0-1")
self.addrule("CACHE_EXISTS=dummy|1.0-1")