From 142c2132cf3312c1ad38d87e323277664985701c Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Thu, 2 Jun 2011 17:20:45 -0500 Subject: Add two currently failing test cases from bug reports Signed-off-by: Dan McGee --- test/pacman/tests/replace101.py | 25 +++++++++++++++++++++++++ test/pacman/tests/replace102.py | 27 +++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 test/pacman/tests/replace101.py create mode 100644 test/pacman/tests/replace102.py diff --git a/test/pacman/tests/replace101.py b/test/pacman/tests/replace101.py new file mode 100644 index 00000000..86c40ac6 --- /dev/null +++ b/test/pacman/tests/replace101.py @@ -0,0 +1,25 @@ +self.description = "Sysupgrade with a versioned replacement" + +sp1 = pmpkg("python2-yaml", "5-1") +sp1.replaces = ["python-yaml<5"] +sp1.conflicts = ["python-yaml<5"] +sp1.files = ["lib/python2/file"] +self.addpkg2db("sync", sp1) + +# the python3 version +sp2 = pmpkg("python-yaml", "5-1") +sp2.files = ["lib/python3/file"] +self.addpkg2db("sync", sp2) + +lp1 = pmpkg("python-yaml", "4-1") +lp1.files = ["lib/python2/file"] +self.addpkg2db("local", lp1) + +self.args = "-Su" + +self.addrule("PACMAN_RETCODE=0") +self.addrule("!PKG_EXIST=python-yaml") +self.addrule("PKG_VERSION=python2-yaml|5-1") +self.addrule("FILE_EXIST=lib/python2/file") + +self.expectfailure = True diff --git a/test/pacman/tests/replace102.py b/test/pacman/tests/replace102.py new file mode 100644 index 00000000..c6e2e5f0 --- /dev/null +++ b/test/pacman/tests/replace102.py @@ -0,0 +1,27 @@ +self.description = "Replace a package with a file in 'backup' (local modified)" +# FS#24543 + +lp = pmpkg("dummy") +lp.files = ["etc/dummy.conf*", "bin/dummy"] +lp.backup = ["etc/dummy.conf"] +self.addpkg2db("local", lp) + +sp = pmpkg("replacement") +sp.replaces = ["dummy"] +sp.files = ["etc/dummy.conf", "bin/dummy*"] +sp.backup = ["etc/dummy.conf"] +self.addpkg2db("sync", sp) + +self.args = "-Su" + +self.addrule("!PKG_EXIST=dummy") +self.addrule("PKG_EXIST=replacement") + +self.addrule("FILE_EXIST=etc/dummy.conf") +self.addrule("!FILE_MODIFIED=etc/dummy.conf") +self.addrule("!FILE_PACNEW=etc/dummy.conf") +self.addrule("!FILE_PACSAVE=etc/dummy.conf") + +self.addrule("FILE_EXIST=bin/dummy") + +self.expectfailure = True -- cgit v1.2.3-70-g09d2