From 1dca8b630937450ba66351f53c5ce3e59f14732c Mon Sep 17 00:00:00 2001
From: Chantry Xavier <shiningxc@gmail.com>
Date: Mon, 14 Jan 2008 20:02:01 +0100
Subject: Rename provision related pactests to provision*.py.

Also add 3 new pactests to cover both the -U and -S operations for versioned
provisions.

Signed-off-by: Chantry Xavier <shiningxc@gmail.com>
Signed-off-by: Dan McGee <dan@archlinux.org>
---
 pactest/tests/add043.py       | 15 ---------------
 pactest/tests/add044.py       | 15 ---------------
 pactest/tests/add045.py       | 15 ---------------
 pactest/tests/provision001.py | 10 ++++++++++
 pactest/tests/provision002.py | 15 +++++++++++++++
 pactest/tests/provision010.py | 15 +++++++++++++++
 pactest/tests/provision011.py | 15 +++++++++++++++
 pactest/tests/provision012.py | 15 +++++++++++++++
 pactest/tests/provision020.py | 15 +++++++++++++++
 pactest/tests/provision021.py | 15 +++++++++++++++
 pactest/tests/provision022.py | 15 +++++++++++++++
 pactest/tests/sync500.py      | 10 ----------
 pactest/tests/sync501.py      | 15 ---------------
 13 files changed, 115 insertions(+), 70 deletions(-)
 delete mode 100644 pactest/tests/add043.py
 delete mode 100644 pactest/tests/add044.py
 delete mode 100644 pactest/tests/add045.py
 create mode 100644 pactest/tests/provision001.py
 create mode 100644 pactest/tests/provision002.py
 create mode 100644 pactest/tests/provision010.py
 create mode 100644 pactest/tests/provision011.py
 create mode 100644 pactest/tests/provision012.py
 create mode 100644 pactest/tests/provision020.py
 create mode 100644 pactest/tests/provision021.py
 create mode 100644 pactest/tests/provision022.py
 delete mode 100644 pactest/tests/sync500.py
 delete mode 100644 pactest/tests/sync501.py

(limited to 'pactest')

diff --git a/pactest/tests/add043.py b/pactest/tests/add043.py
deleted file mode 100644
index 18f732ee..00000000
--- a/pactest/tests/add043.py
+++ /dev/null
@@ -1,15 +0,0 @@
-self.description = "provision>=1.0-2 dependency"
-
-p = pmpkg("pkg1", "1.0-2")
-p.depends = ["provision>=1.0-2"]
-self.addpkg(p)
-
-lp = pmpkg("pkg2", "1.0-2")
-lp.provides = ["provision"]
-self.addpkg2db("local", lp)
-
-self.args = "-A %s" % p.filename()
-
-self.addrule("PACMAN_RETCODE=1")
-self.addrule("!PKG_EXIST=pkg1")
-self.addrule("PKG_EXIST=pkg2")
diff --git a/pactest/tests/add044.py b/pactest/tests/add044.py
deleted file mode 100644
index cbc82e9d..00000000
--- a/pactest/tests/add044.py
+++ /dev/null
@@ -1,15 +0,0 @@
-self.description = "provision>=1.0-2 dependency (2)"
-
-p = pmpkg("pkg1", "1.0-2")
-p.depends = ["provision>=1.0-2"]
-self.addpkg(p)
-
-lp = pmpkg("pkg2", "1.0-2")
-lp.provides = ["provision 1.0-2"]
-self.addpkg2db("local", lp)
-
-self.args = "-A %s" % p.filename()
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("PKG_EXIST=pkg1")
-self.addrule("PKG_EXIST=pkg2")
diff --git a/pactest/tests/add045.py b/pactest/tests/add045.py
deleted file mode 100644
index b53e0906..00000000
--- a/pactest/tests/add045.py
+++ /dev/null
@@ -1,15 +0,0 @@
-self.description = "provision>=1.0-2 dependency (3)"
-
-p = pmpkg("pkg1", "1.0-2")
-p.depends = ["provision>=1.0-2"]
-self.addpkg(p)
-
-lp = pmpkg("pkg2", "1.0-2")
-lp.provides = ["provision 1.0-1"]
-self.addpkg2db("local", lp)
-
-self.args = "-A %s" % p.filename()
-
-self.addrule("PACMAN_RETCODE=1")
-self.addrule("!PKG_EXIST=pkg1")
-self.addrule("PKG_EXIST=pkg2")
diff --git a/pactest/tests/provision001.py b/pactest/tests/provision001.py
new file mode 100644
index 00000000..36364c16
--- /dev/null
+++ b/pactest/tests/provision001.py
@@ -0,0 +1,10 @@
+self.description = "-S provision"
+
+sp = pmpkg("pkg1")
+sp.provides = ["provision 1.0-1"]
+self.addpkg2db("sync", sp)
+
+self.args = "-S provision"
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_EXIST=pkg1")
diff --git a/pactest/tests/provision002.py b/pactest/tests/provision002.py
new file mode 100644
index 00000000..fa5f3688
--- /dev/null
+++ b/pactest/tests/provision002.py
@@ -0,0 +1,15 @@
+self.description = "-S provision"
+
+sp = pmpkg("pkg1")
+sp.provides = ["provision 1.0-1"]
+self.addpkg2db("sync", sp)
+
+sp = pmpkg("pkg2")
+sp.provides = ["provision 1.0-1"]
+self.addpkg2db("sync", sp)
+
+self.args = "-S provision"
+
+self.addrule("PACMAN_RETCODE=1")
+self.addrule("!PKG_EXIST=pkg1")
+self.addrule("!PKG_EXIST=pkg2")
diff --git a/pactest/tests/provision010.py b/pactest/tests/provision010.py
new file mode 100644
index 00000000..711a7319
--- /dev/null
+++ b/pactest/tests/provision010.py
@@ -0,0 +1,15 @@
+self.description = "provision>=1.0-2 dependency"
+
+p = pmpkg("pkg1", "1.0-2")
+p.depends = ["provision>=1.0-2"]
+self.addpkg(p)
+
+lp = pmpkg("pkg2", "1.0-2")
+lp.provides = ["provision"]
+self.addpkg2db("local", lp)
+
+self.args = "-U %s" % p.filename()
+
+self.addrule("PACMAN_RETCODE=1")
+self.addrule("!PKG_EXIST=pkg1")
+self.addrule("PKG_EXIST=pkg2")
diff --git a/pactest/tests/provision011.py b/pactest/tests/provision011.py
new file mode 100644
index 00000000..7fd5e6b4
--- /dev/null
+++ b/pactest/tests/provision011.py
@@ -0,0 +1,15 @@
+self.description = "provision>=1.0-2 dependency (2)"
+
+p = pmpkg("pkg1", "1.0-2")
+p.depends = ["provision>=1.0-2"]
+self.addpkg(p)
+
+lp = pmpkg("pkg2", "1.0-2")
+lp.provides = ["provision 1.0-2"]
+self.addpkg2db("local", lp)
+
+self.args = "-U %s" % p.filename()
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_EXIST=pkg1")
+self.addrule("PKG_EXIST=pkg2")
diff --git a/pactest/tests/provision012.py b/pactest/tests/provision012.py
new file mode 100644
index 00000000..11cdad4e
--- /dev/null
+++ b/pactest/tests/provision012.py
@@ -0,0 +1,15 @@
+self.description = "provision>=1.0-2 dependency (3)"
+
+p = pmpkg("pkg1", "1.0-2")
+p.depends = ["provision>=1.0-2"]
+self.addpkg(p)
+
+lp = pmpkg("pkg2", "1.0-2")
+lp.provides = ["provision 1.0-1"]
+self.addpkg2db("local", lp)
+
+self.args = "-U %s" % p.filename()
+
+self.addrule("PACMAN_RETCODE=1")
+self.addrule("!PKG_EXIST=pkg1")
+self.addrule("PKG_EXIST=pkg2")
diff --git a/pactest/tests/provision020.py b/pactest/tests/provision020.py
new file mode 100644
index 00000000..7cb0a01b
--- /dev/null
+++ b/pactest/tests/provision020.py
@@ -0,0 +1,15 @@
+self.description = "provision>=1.0-2 dependency"
+
+p = pmpkg("pkg1", "1.0-2")
+p.depends = ["provision>=1.0-2"]
+self.addpkg2db("sync", p)
+
+lp = pmpkg("pkg2", "1.0-2")
+lp.provides = ["provision"]
+self.addpkg2db("local", lp)
+
+self.args = "-S %s" % p.name
+
+self.addrule("PACMAN_RETCODE=1")
+self.addrule("!PKG_EXIST=pkg1")
+self.addrule("PKG_EXIST=pkg2")
diff --git a/pactest/tests/provision021.py b/pactest/tests/provision021.py
new file mode 100644
index 00000000..4b06a1a7
--- /dev/null
+++ b/pactest/tests/provision021.py
@@ -0,0 +1,15 @@
+self.description = "provision>=1.0-2 dependency (2)"
+
+p = pmpkg("pkg1", "1.0-2")
+p.depends = ["provision>=1.0-2"]
+self.addpkg2db("sync", p)
+
+lp = pmpkg("pkg2", "1.0-2")
+lp.provides = ["provision 1.0-2"]
+self.addpkg2db("local", lp)
+
+self.args = "-S %s" % p.name
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_EXIST=pkg1")
+self.addrule("PKG_EXIST=pkg2")
diff --git a/pactest/tests/provision022.py b/pactest/tests/provision022.py
new file mode 100644
index 00000000..d7f06913
--- /dev/null
+++ b/pactest/tests/provision022.py
@@ -0,0 +1,15 @@
+self.description = "provision>=1.0-2 dependency (3)"
+
+p = pmpkg("pkg1", "1.0-2")
+p.depends = ["provision>=1.0-2"]
+self.addpkg2db("sync", p)
+
+lp = pmpkg("pkg2", "1.0-2")
+lp.provides = ["provision 1.0-1"]
+self.addpkg2db("local", lp)
+
+self.args = "-S %s" % p.name
+
+self.addrule("PACMAN_RETCODE=1")
+self.addrule("!PKG_EXIST=pkg1")
+self.addrule("PKG_EXIST=pkg2")
diff --git a/pactest/tests/sync500.py b/pactest/tests/sync500.py
deleted file mode 100644
index 36364c16..00000000
--- a/pactest/tests/sync500.py
+++ /dev/null
@@ -1,10 +0,0 @@
-self.description = "-S provision"
-
-sp = pmpkg("pkg1")
-sp.provides = ["provision 1.0-1"]
-self.addpkg2db("sync", sp)
-
-self.args = "-S provision"
-
-self.addrule("PACMAN_RETCODE=0")
-self.addrule("PKG_EXIST=pkg1")
diff --git a/pactest/tests/sync501.py b/pactest/tests/sync501.py
deleted file mode 100644
index fa5f3688..00000000
--- a/pactest/tests/sync501.py
+++ /dev/null
@@ -1,15 +0,0 @@
-self.description = "-S provision"
-
-sp = pmpkg("pkg1")
-sp.provides = ["provision 1.0-1"]
-self.addpkg2db("sync", sp)
-
-sp = pmpkg("pkg2")
-sp.provides = ["provision 1.0-1"]
-self.addpkg2db("sync", sp)
-
-self.args = "-S provision"
-
-self.addrule("PACMAN_RETCODE=1")
-self.addrule("!PKG_EXIST=pkg1")
-self.addrule("!PKG_EXIST=pkg2")
-- 
cgit v1.2.3-70-g09d2