summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-07-18 10:34:39 -0500
committerDan McGee <dan@archlinux.org>2011-07-18 10:34:39 -0500
commit0b92d9ed9c6bffcf4b47645a365ea6c3d162e89e (patch)
tree3145903401ffb1086901879dc5850e78a2f8583b /test
parent1c39e4fbade29d570858ca6eca4958ab72cfbdd0 (diff)
downloadpacman-0b92d9ed9c6bffcf4b47645a365ea6c3d162e89e.tar.xz
Add a new epoch pactest
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'test')
-rw-r--r--test/pacman/tests/epoch005.py25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/pacman/tests/epoch005.py b/test/pacman/tests/epoch005.py
new file mode 100644
index 00000000..4af8edfd
--- /dev/null
+++ b/test/pacman/tests/epoch005.py
@@ -0,0 +1,25 @@
+self.description = "Sysupgrade with sync packages having absurd epochs"
+
+versions = (
+ "1234327518932650063289125782697890:1.0-1",
+ "1234327518932650063289125782697891:0.9-1",
+ "1234327518932650063289125782697891:1.0-1",
+ "1234327518932650063289125782697891:1.1-1",
+ "1234327518932650063289125782697892:1.0-1",
+)
+
+pkgvers = [(n, versions[n]) for n in range(len(versions))]
+for k, v in pkgvers:
+ sp = pmpkg("pkg_%d" % k, v)
+ self.addpkg2db("sync", sp)
+
+for k, v in pkgvers:
+ lp = pmpkg("pkg_%d" % k, versions[2])
+ self.addpkg2db("local", lp)
+
+self.args = "-Su"
+
+self.addrule("PACMAN_RETCODE=0")
+for k, v in pkgvers:
+ right_ver = versions[max(k, 2)]
+ self.addrule("PKG_VERSION=pkg_%d|%s" % (k, right_ver))