summaryrefslogtreecommitdiffstats
path: root/test/pacman/tests/clean001.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/pacman/tests/clean001.py')
-rw-r--r--test/pacman/tests/clean001.py26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/pacman/tests/clean001.py b/test/pacman/tests/clean001.py
new file mode 100644
index 00000000..ad86250a
--- /dev/null
+++ b/test/pacman/tests/clean001.py
@@ -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")