summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2014-07-04 23:12:01 +0200
committerAllan McRae <allan@archlinux.org>2014-09-30 22:33:26 +1000
commit04e8048725441465788a6c76a326ff252c2fd815 (patch)
tree22ce157e65f1eae5e1f11357adee781b10fb1246 /test
parent4e263f24c6ed1cc710b7873b9ea37534117247ea (diff)
downloadpacman-04e8048725441465788a6c76a326ff252c2fd815.tar.xz
Add --assume-installed option
This allows to ignore specific dependencies. Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'test')
-rw-r--r--test/pacman/tests/TESTS3
-rw-r--r--test/pacman/tests/remove-assumeinstalled.py14
-rw-r--r--test/pacman/tests/sync-install-assumeinstalled.py11
-rw-r--r--test/pacman/tests/sync-update-assumeinstalled.py19
4 files changed, 47 insertions, 0 deletions
diff --git a/test/pacman/tests/TESTS b/test/pacman/tests/TESTS
index 1b5a81f9..052cf4b2 100644
--- a/test/pacman/tests/TESTS
+++ b/test/pacman/tests/TESTS
@@ -92,6 +92,7 @@ TESTS += test/pacman/tests/querycheck001.py
TESTS += test/pacman/tests/querycheck002.py
TESTS += test/pacman/tests/querycheck_fast_file_type.py
TESTS += test/pacman/tests/reason001.py
+TESTS += test/pacman/tests/remove-assumeinstalled.py
TESTS += test/pacman/tests/remove001.py
TESTS += test/pacman/tests/remove002.py
TESTS += test/pacman/tests/remove010.py
@@ -135,12 +136,14 @@ TESTS += test/pacman/tests/symlink010.py
TESTS += test/pacman/tests/symlink011.py
TESTS += test/pacman/tests/symlink012.py
TESTS += test/pacman/tests/symlink020.py
+TESTS += test/pacman/tests/sync-install-assumeinstalled.py
TESTS += test/pacman/tests/sync-nodepversion01.py
TESTS += test/pacman/tests/sync-nodepversion02.py
TESTS += test/pacman/tests/sync-nodepversion03.py
TESTS += test/pacman/tests/sync-nodepversion04.py
TESTS += test/pacman/tests/sync-nodepversion05.py
TESTS += test/pacman/tests/sync-nodepversion06.py
+TESTS += test/pacman/tests/sync-update-assumeinstalled.py
TESTS += test/pacman/tests/sync-update-package-removing-required-provides.py
TESTS += test/pacman/tests/sync001.py
TESTS += test/pacman/tests/sync002.py
diff --git a/test/pacman/tests/remove-assumeinstalled.py b/test/pacman/tests/remove-assumeinstalled.py
new file mode 100644
index 00000000..4f3630ce
--- /dev/null
+++ b/test/pacman/tests/remove-assumeinstalled.py
@@ -0,0 +1,14 @@
+self.description = "Remove a package using --assume-installed"
+
+lp1 = pmpkg("pkg1", "1.0-1")
+
+lp2 = pmpkg("pkg2", "1.0-1")
+lp2.depends = ["pkg1=1.0"]
+for p in lp1, lp2:
+ self.addpkg2db("local", p);
+
+self.args = "-R pkg1 --assume-installed pkg1=1.0"
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_EXIST=pkg2")
+self.addrule("!PKG_EXIST=pkg1")
diff --git a/test/pacman/tests/sync-install-assumeinstalled.py b/test/pacman/tests/sync-install-assumeinstalled.py
new file mode 100644
index 00000000..6744dc87
--- /dev/null
+++ b/test/pacman/tests/sync-install-assumeinstalled.py
@@ -0,0 +1,11 @@
+self.description = "Install a package using --assume-installed"
+
+sp1 = pmpkg("pkg2", "2.0-1")
+sp1.depends = ["pkg1"]
+
+self.addpkg2db("sync", sp1);
+
+self.args = "-S pkg2 --assume-installed pkg1"
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_EXIST=pkg2")
diff --git a/test/pacman/tests/sync-update-assumeinstalled.py b/test/pacman/tests/sync-update-assumeinstalled.py
new file mode 100644
index 00000000..c22a20e1
--- /dev/null
+++ b/test/pacman/tests/sync-update-assumeinstalled.py
@@ -0,0 +1,19 @@
+self.description = "Update a package using --assume-installed"
+
+lp1 = pmpkg("pkg1", "1.0-1")
+
+lp2 = pmpkg("pkg2", "1.0-1")
+lp2.depends = ["pkg1=1.0"]
+
+sp1 = pmpkg("pkg1", "2.0-1")
+
+for p in lp1, lp2:
+ self.addpkg2db("local", p);
+
+self.addpkg2db("sync", sp1);
+
+self.args = "-Su --assume-installed pkg1=1.0"
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_VERSION=pkg1|2.0-1")
+self.addrule("PKG_EXIST=pkg2")