summaryrefslogtreecommitdiff
path: root/test/pacman/tests/sync022.py
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-07-25 22:15:25 -0500
committerDan McGee <dan@archlinux.org>2010-07-27 10:10:55 -0500
commite702f56ea671c6cd1154a0ddb41fa63e97587c85 (patch)
tree91c025dba476a2296cbbed61388c83946b64f12f /test/pacman/tests/sync022.py
parent7f5c486666cc99fba4029b2c059ae062b7dd7933 (diff)
downloadpacman-e702f56ea671c6cd1154a0ddb41fa63e97587c85.tar.xz
Add two pactests for group and --needed interaction
The first step for resolving FS#20221. sync023 is the case from the bug report; sync022 is already working fine but we have no tests at all that test the --needed option in any form. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'test/pacman/tests/sync022.py')
-rw-r--r--test/pacman/tests/sync022.py25
1 files changed, 25 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")