summaryrefslogtreecommitdiff
path: root/test/pacman/tests
diff options
context:
space:
mode:
Diffstat (limited to 'test/pacman/tests')
-rw-r--r--test/pacman/tests/ignore001.py2
-rw-r--r--test/pacman/tests/pacman005.py8
-rw-r--r--test/pacman/tests/sync140.py13
-rw-r--r--test/pacman/tests/sync141.py13
-rw-r--r--test/pacman/tests/sync142.py14
-rw-r--r--test/pacman/tests/sync143.py18
6 files changed, 67 insertions, 1 deletions
diff --git a/test/pacman/tests/ignore001.py b/test/pacman/tests/ignore001.py
index bb3fa59a..e9764bc9 100644
--- a/test/pacman/tests/ignore001.py
+++ b/test/pacman/tests/ignore001.py
@@ -9,7 +9,7 @@ self.addpkg2db("local", package2)
package2up = pmpkg("package2", "2.0-1")
self.addpkg2db("sync", package2up)
-self.option["IgnorePkg"] = ["irrelavent"]
+self.option["IgnorePkg"] = ["irrelevant"]
self.args = "-Su"
self.addrule("PACMAN_RETCODE=0")
diff --git a/test/pacman/tests/pacman005.py b/test/pacman/tests/pacman005.py
new file mode 100644
index 00000000..bb21ad4f
--- /dev/null
+++ b/test/pacman/tests/pacman005.py
@@ -0,0 +1,8 @@
+self.description = "Test invalid combination of command line options (-Qy)"
+
+p = pmpkg("foobar")
+self.addpkg2db("local", p)
+
+self.args = "-Qy"
+
+self.addrule("PACMAN_RETCODE=1")
diff --git a/test/pacman/tests/sync140.py b/test/pacman/tests/sync140.py
new file mode 100644
index 00000000..b7ec9fcf
--- /dev/null
+++ b/test/pacman/tests/sync140.py
@@ -0,0 +1,13 @@
+self.description = "Sysupgrade with a sync package having higher epoch"
+
+sp = pmpkg("dummy", "1.0-1")
+sp.epoch = 1
+self.addpkg2db("sync", sp)
+
+lp = pmpkg("dummy", "1.1-1")
+self.addpkg2db("local", lp)
+
+self.args = "-Su"
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_VERSION=dummy|1.0-1")
diff --git a/test/pacman/tests/sync141.py b/test/pacman/tests/sync141.py
new file mode 100644
index 00000000..dac81f76
--- /dev/null
+++ b/test/pacman/tests/sync141.py
@@ -0,0 +1,13 @@
+self.description = "Sysupgrade with an epoch and ignore on same package"
+
+lp = pmpkg("dummy", "1.0-1")
+self.addpkg2db("local", lp)
+
+sp = pmpkg("dummy", "1.0-2")
+sp.epoch = 1
+self.addpkg2db("sync", sp)
+
+self.args = "-Su --ignore %s" % lp.name
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_VERSION=dummy|1.0-1")
diff --git a/test/pacman/tests/sync142.py b/test/pacman/tests/sync142.py
new file mode 100644
index 00000000..83766bb8
--- /dev/null
+++ b/test/pacman/tests/sync142.py
@@ -0,0 +1,14 @@
+self.description = "Sysupgrade with an epoch package overriding a force package"
+
+sp = pmpkg("dummy", "1.4-1")
+sp.epoch = 2
+self.addpkg2db("sync", sp)
+
+lp = pmpkg("dummy", "2.0-1")
+lp.force = 1
+self.addpkg2db("local", lp)
+
+self.args = "-Su"
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_VERSION=dummy|1.4-1")
diff --git a/test/pacman/tests/sync143.py b/test/pacman/tests/sync143.py
new file mode 100644
index 00000000..37353a84
--- /dev/null
+++ b/test/pacman/tests/sync143.py
@@ -0,0 +1,18 @@
+self.description = "Sysupgrade with same version, different epochs"
+
+sp = pmpkg("dummy", "2.0-1")
+sp.files = ["bin/dummynew"]
+sp.epoch = 2
+self.addpkg2db("sync", sp)
+
+lp = pmpkg("dummy", "2.0-1")
+lp.files = ["bin/dummyold"]
+lp.force = 1
+self.addpkg2db("local", lp)
+
+self.args = "-Su"
+
+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")