From b96922679e4ed14aa687bf194b766d82a1d10577 Mon Sep 17 00:00:00 2001 From: Nagy Gabor Date: Sat, 4 Aug 2007 17:08:03 +0200 Subject: Add two pactest for versioned conflicts. A side effect of the previous commit ( ea9a756eeaca7398c0860b55f8abe2932ad195bd ) is that it's now possible to use versioned conflicts. Add two new conflict pactests for showing it. Signed-off-by: Chantry Xavier --- pactest/tests/conflict002.py | 13 +++++++++++++ pactest/tests/conflict003.py | 13 +++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 pactest/tests/conflict002.py create mode 100644 pactest/tests/conflict003.py (limited to 'pactest/tests') diff --git a/pactest/tests/conflict002.py b/pactest/tests/conflict002.py new file mode 100644 index 00000000..2e326f52 --- /dev/null +++ b/pactest/tests/conflict002.py @@ -0,0 +1,13 @@ +self.description = "conflict with version (conflict)" + +p = pmpkg("pkg1") +p.conflicts = ["pkg2<=1.0-2"] +self.addpkg(p); + +lp = pmpkg("pkg2", "1.0-1") +self.addpkg2db("local", lp) + +self.args = "-A %s" % p.filename() +self.addrule("PACMAN_RETCODE=1") +self.addrule("!PKG_EXIST=pkg1") +self.addrule("PKG_EXIST=pkg2") diff --git a/pactest/tests/conflict003.py b/pactest/tests/conflict003.py new file mode 100644 index 00000000..7205086a --- /dev/null +++ b/pactest/tests/conflict003.py @@ -0,0 +1,13 @@ +self.description = "conflict with version (no conflict)" + +p = pmpkg("pkg1") +p.conflicts = ["pkg2=1.0-2"] +self.addpkg(p); + +lp = pmpkg("pkg2", "1.0-1") +self.addpkg2db("local", lp) + +self.args = "-A %s" % p.filename() +self.addrule("PACMAN_RETCODE=0") +self.addrule("PKG_EXIST=pkg1") +self.addrule("PKG_EXIST=pkg2") -- cgit v1.2.3-70-g09d2