Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/pacman/meson.build2
-rw-r--r--test/pacman/tests/multiple-architectures01.py14
-rw-r--r--test/pacman/tests/multiple-architectures02.py16
3 files changed, 32 insertions, 0 deletions
diff --git a/test/pacman/meson.build b/test/pacman/meson.build
index 52ff9b9a..6c28bd7d 100644
--- a/test/pacman/meson.build
+++ b/test/pacman/meson.build
@@ -85,6 +85,8 @@ pacman_tests = [
'tests/mode001.py',
'tests/mode002.py',
'tests/mode003.py',
+ 'tests/multiple-architectures01.py',
+ 'tests/multiple-architectures02.py',
'tests/noupgrade-inverted.py',
'tests/overwrite-files-match-negated.py',
'tests/overwrite-files-match.py',
diff --git a/test/pacman/tests/multiple-architectures01.py b/test/pacman/tests/multiple-architectures01.py
new file mode 100644
index 00000000..39f3e1f7
--- /dev/null
+++ b/test/pacman/tests/multiple-architectures01.py
@@ -0,0 +1,14 @@
+self.description = "Install a package (multiple Architecture options, wrong)"
+
+p = pmpkg("dummy")
+p.files = ["bin/dummy",
+ "usr/man/man1/dummy.1"]
+p.arch = 'i686'
+self.addpkg(p)
+
+self.option["Architecture"] = ['i586', 'i486', 'i386']
+
+self.args = "-U %s" % p.filename()
+
+self.addrule("PACMAN_RETCODE=1")
+self.addrule("!PKG_EXIST=dummy")
diff --git a/test/pacman/tests/multiple-architectures02.py b/test/pacman/tests/multiple-architectures02.py
new file mode 100644
index 00000000..18625ec6
--- /dev/null
+++ b/test/pacman/tests/multiple-architectures02.py
@@ -0,0 +1,16 @@
+self.description = "Install a package (multiple Architecture options)"
+
+p = pmpkg("dummy")
+p.files = ["bin/dummy",
+ "usr/man/man1/dummy.1"]
+p.arch = 'i486'
+self.addpkg(p)
+
+self.option["Architecture"] = ['i586', 'i486', 'i386']
+
+self.args = "-U %s" % p.filename()
+
+self.addrule("PACMAN_RETCODE=0")
+self.addrule("PKG_EXIST=dummy")
+for f in p.files:
+ self.addrule("FILE_EXIST=%s" % f) \ No newline at end of file