Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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")