summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-01-03 18:35:27 -0600
committerDan McGee <dan@archlinux.org>2011-01-21 19:30:45 -0600
commite068b58507ad58e2037aeb323a74d27377a0feac (patch)
tree702ce15f584f94ccd3eb63975d6fd68df5a34f83
parent50f446886b8b09b9bcdb30494d7a0c4d93a8a37a (diff)
downloadpacman-e068b58507ad58e2037aeb323a74d27377a0feac.tar.xz
pactest: add more testing for epoch
Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--test/pacman/tests/epoch001.py1
-rw-r--r--test/pacman/tests/epoch002.py1
-rw-r--r--test/pacman/tests/epoch003.py1
-rw-r--r--test/pacman/tests/epoch004.py1
-rw-r--r--test/pacman/tests/epoch010.py14
-rw-r--r--test/pacman/tests/epoch011.py15
-rw-r--r--test/pacman/tests/epoch012.py15
7 files changed, 48 insertions, 0 deletions
diff --git a/test/pacman/tests/epoch001.py b/test/pacman/tests/epoch001.py
index b7ec9fcf..e1d31142 100644
--- a/test/pacman/tests/epoch001.py
+++ b/test/pacman/tests/epoch001.py
@@ -11,3 +11,4 @@ self.args = "-Su"
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_VERSION=dummy|1.0-1")
+self.addrule("PKG_EPOCH=dummy|1")
diff --git a/test/pacman/tests/epoch002.py b/test/pacman/tests/epoch002.py
index dac81f76..9e8a0482 100644
--- a/test/pacman/tests/epoch002.py
+++ b/test/pacman/tests/epoch002.py
@@ -11,3 +11,4 @@ self.args = "-Su --ignore %s" % lp.name
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_VERSION=dummy|1.0-1")
+self.addrule("PKG_EPOCH=dummy|0")
diff --git a/test/pacman/tests/epoch003.py b/test/pacman/tests/epoch003.py
index 726ef304..17ca9bfb 100644
--- a/test/pacman/tests/epoch003.py
+++ b/test/pacman/tests/epoch003.py
@@ -12,3 +12,4 @@ self.args = "-Su"
self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_VERSION=dummy|1.4-1")
+self.addrule("PKG_EPOCH=dummy|2")
diff --git a/test/pacman/tests/epoch004.py b/test/pacman/tests/epoch004.py
index 2ee940a9..ad3e9953 100644
--- a/test/pacman/tests/epoch004.py
+++ b/test/pacman/tests/epoch004.py
@@ -16,3 +16,4 @@ self.addrule("PACMAN_RETCODE=0")
self.addrule("PKG_VERSION=dummy|2.0-1")
self.addrule("FILE_EXIST=bin/dummynew")
self.addrule("!FILE_EXIST=bin/dummyold")
+self.addrule("PKG_EPOCH=dummy|2")
diff --git a/test/pacman/tests/epoch010.py b/test/pacman/tests/epoch010.py
new file mode 100644
index 00000000..3277597b
--- /dev/null
+++ b/test/pacman/tests/epoch010.py
@@ -0,0 +1,14 @@
+self.description = "usbutils case study: force in new package"
+
+sp = pmpkg("usbutils", "001-1")
+sp.force = True
+self.addpkg2db("sync", sp)
+
+lp = pmpkg("usbutils", "0.91-4")
+self.addpkg2db("local", lp)
+
+self.args = "-Su"
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_VERSION=usbutils|001-1")
+self.addrule("PKG_EPOCH=usbutils|1")
diff --git a/test/pacman/tests/epoch011.py b/test/pacman/tests/epoch011.py
new file mode 100644
index 00000000..2c064aa1
--- /dev/null
+++ b/test/pacman/tests/epoch011.py
@@ -0,0 +1,15 @@
+self.description = "usbutils case study: force stays, epoch now in local db"
+
+sp = pmpkg("usbutils", "002-1")
+sp.force = True
+self.addpkg2db("sync", sp)
+
+lp = pmpkg("usbutils", "001-1")
+lp.epoch = 1
+self.addpkg2db("local", lp)
+
+self.args = "-Su"
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_VERSION=usbutils|002-1")
+self.addrule("PKG_EPOCH=usbutils|1")
diff --git a/test/pacman/tests/epoch012.py b/test/pacman/tests/epoch012.py
new file mode 100644
index 00000000..e0c7314d
--- /dev/null
+++ b/test/pacman/tests/epoch012.py
@@ -0,0 +1,15 @@
+self.description = "usbutils case study: maintainer screws up and removes force"
+
+sp = pmpkg("usbutils", "003-1")
+self.addpkg2db("sync", sp)
+
+lp = pmpkg("usbutils", "002-1")
+lp.epoch = 1
+self.addpkg2db("local", lp)
+
+self.args = "-Su"
+
+self.addrule("PACMAN_RETCODE=0")
+# remember, this is how we have to handle this- 003 will not be installed
+self.addrule("PKG_VERSION=usbutils|002-1")
+self.addrule("PKG_EPOCH=usbutils|1")