summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-07-27 10:18:35 -0500
committerDan McGee <dan@archlinux.org>2010-07-27 10:18:35 -0500
commitddc4130c978decc5b2498b24d3b20e0c4efbc3cf (patch)
tree4c15921873c853c9636e63b563392610b6e25e03 /test
parenta83559949622992faafb628b742893891ead8390 (diff)
parent0d6efb35ce445747cdc37b4f58cdf63463de6e1a (diff)
downloadpacman-ddc4130c978decc5b2498b24d3b20e0c4efbc3cf.tar.xz
Merge branch 'maint'
Diffstat (limited to 'test')
-rw-r--r--test/pacman/tests/sync022.py25
-rw-r--r--test/pacman/tests/sync023.py29
2 files changed, 54 insertions, 0 deletions
diff --git a/test/pacman/tests/sync022.py b/test/pacman/tests/sync022.py
new file mode 100644
index 00000000..eebbe07d
--- /dev/null
+++ b/test/pacman/tests/sync022.py
@@ -0,0 +1,25 @@
+self.description = "Install a group from a sync db using --needed"
+
+lp1 = pmpkg("pkg1")
+lp2 = pmpkg("pkg2")
+lp3 = pmpkg("pkg3")
+
+sp1 = pmpkg("pkg1", "1.1-1")
+sp2 = pmpkg("pkg2")
+sp3 = pmpkg("pkg3")
+
+for p in lp1, lp2, lp3, sp1, sp2, sp3:
+ setattr(p, "groups", ["grp"])
+
+for p in lp1, lp2, lp3:
+ self.addpkg2db("local", p)
+
+for p in sp1, sp2, sp3:
+ self.addpkg2db("sync", p);
+
+self.args = "-S --needed grp"
+
+self.addrule("PACMAN_RETCODE=0")
+for p in sp1, sp2, sp3:
+ self.addrule("PKG_EXIST=%s" % p.name)
+self.addrule("PKG_VERSION=pkg1|1.1-1")
diff --git a/test/pacman/tests/sync023.py b/test/pacman/tests/sync023.py
new file mode 100644
index 00000000..8233ab73
--- /dev/null
+++ b/test/pacman/tests/sync023.py
@@ -0,0 +1,29 @@
+self.description = "Install a group from a sync db using --needed (testing repo)"
+
+lp1 = pmpkg("pkg1", "1.1-1")
+lp2 = pmpkg("pkg2")
+lp3 = pmpkg("pkg3")
+
+sp1 = pmpkg("pkg1")
+sp2 = pmpkg("pkg2")
+sp3 = pmpkg("pkg3")
+newp1 = pmpkg("pkg1", "1.1-1")
+
+for p in lp1, lp2, lp3, sp1, sp2, sp3, newp1:
+ setattr(p, "groups", ["grp"])
+
+for p in lp1, lp2, lp3:
+ self.addpkg2db("local", p)
+
+self.addpkg2db("testing", newp1);
+
+for p in sp1, sp2, sp3:
+ self.addpkg2db("sync", p);
+
+self.args = "-S --needed grp"
+
+self.addrule("PACMAN_RETCODE=0")
+for p in sp1, sp2, sp3:
+ self.addrule("PKG_EXIST=%s" % p.name)
+# The newer version should still be installed
+self.addrule("PKG_VERSION=pkg1|1.1-1")