[pacman-dev] [PATCH] add 3 pactests for -Sdd

Xavier Chantry chantry.xavier at gmail.com
Sun Oct 10 13:57:13 EDT 2010


Signed-off-by: Xavier Chantry <chantry.xavier at gmail.com>
---
 test/pacman/tests/sync-sdd1.py |   15 +++++++++++++++
 test/pacman/tests/sync-sdd2.py |   15 +++++++++++++++
 test/pacman/tests/sync-sdd3.py |   15 +++++++++++++++
 3 files changed, 45 insertions(+), 0 deletions(-)
 create mode 100644 test/pacman/tests/sync-sdd1.py
 create mode 100644 test/pacman/tests/sync-sdd2.py
 create mode 100644 test/pacman/tests/sync-sdd3.py

diff --git a/test/pacman/tests/sync-sdd1.py b/test/pacman/tests/sync-sdd1.py
new file mode 100644
index 0000000..184a66d
--- /dev/null
+++ b/test/pacman/tests/sync-sdd1.py
@@ -0,0 +1,15 @@
+self.description = "-Sdd: -Sdd works"
+
+p1 = pmpkg("pkg1", "1.0-2")
+p1.depends = ["provision>=1.0-2"]
+self.addpkg2db("sync", p1)
+
+p2 = pmpkg("pkg2", "1.0-2")
+p2.provides = ["provision=1.0-1"]
+self.addpkg2db("sync", p2)
+
+self.args = "-Sdd %s" % p1.name
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_EXIST=pkg1")
+self.addrule("PKG_EXIST=pkg2")
diff --git a/test/pacman/tests/sync-sdd2.py b/test/pacman/tests/sync-sdd2.py
new file mode 100644
index 0000000..5f1f847
--- /dev/null
+++ b/test/pacman/tests/sync-sdd2.py
@@ -0,0 +1,15 @@
+self.description = "-Sdd: -S fails"
+
+p1 = pmpkg("pkg1", "1.0-2")
+p1.depends = ["provision>=1.0-2"]
+self.addpkg2db("sync", p1)
+
+p2 = pmpkg("pkg2", "1.0-2")
+p2.provides = ["provision=1.0-1"]
+self.addpkg2db("sync", p2)
+
+self.args = "-S %s" % p1.name
+
+self.addrule("PACMAN_RETCODE=1")
+self.addrule("!PKG_EXIST=pkg1")
+self.addrule("!PKG_EXIST=pkg2")
diff --git a/test/pacman/tests/sync-sdd3.py b/test/pacman/tests/sync-sdd3.py
new file mode 100644
index 0000000..68733af
--- /dev/null
+++ b/test/pacman/tests/sync-sdd3.py
@@ -0,0 +1,15 @@
+self.description = "-Sdd: -Sd works but no deps"
+
+p1 = pmpkg("pkg1", "1.0-2")
+p1.depends = ["provision>=1.0-2"]
+self.addpkg2db("sync", p1)
+
+p2 = pmpkg("pkg2", "1.0-2")
+p2.provides = ["provision=1.0-1"]
+self.addpkg2db("sync", p2)
+
+self.args = "-Sd %s" % p1.name
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_EXIST=pkg1")
+self.addrule("!PKG_EXIST=pkg2")
-- 
1.7.3.1



More information about the pacman-dev mailing list