summaryrefslogtreecommitdiff
path: root/pactest
diff options
context:
space:
mode:
authorNagy Gabor <ngaba@bibl.u-szeged.hu>2008-01-11 21:51:50 +0100
committerDan McGee <dan@archlinux.org>2008-01-11 23:19:08 -0600
commit112caad838762383708d692f6479fe112b35f4fc (patch)
tree695d2539efcebeeba9ede9064f4714fd65fbcdb3 /pactest
parent3e133524a54ab55daff666d26c67ac288b605e92 (diff)
downloadpacman-112caad838762383708d692f6479fe112b35f4fc.tar.xz
New reason001.py pactest
This pactest demonstrates that we should copy the reason between the to-be-replaced and replaced packages Signed-off-by: Nagy Gabor <ngaba@bibl.u-szeged.hu> Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'pactest')
-rw-r--r--pactest/tests/reason001.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/pactest/tests/reason001.py b/pactest/tests/reason001.py
new file mode 100644
index 00000000..40433f5e
--- /dev/null
+++ b/pactest/tests/reason001.py
@@ -0,0 +1,16 @@
+self.description = "Copy reason (to-be-replaced -> replacement)"
+
+sp = pmpkg("libfoo-ng")
+sp.replaces = [ "libfoo" ]
+self.addpkg2db("sync", sp)
+
+lp = pmpkg("libfoo")
+lp.reason = 1
+self.addpkg2db("local", lp)
+
+self.args = "-Su"
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("!PKG_EXIST=libfoo")
+self.addrule("PKG_EXIST=libfoo-ng")
+self.addrule("PKG_REASON=libfoo-ng|1")