summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am2
-rw-r--r--tests/data/RPMS/hello-2.0-1.i686.rpmbin0 -> 4376 bytes
-rw-r--r--tests/data/RPMS/hello-2.0-1.x86_64.rpmbin0 -> 4356 bytes
-rw-r--r--tests/rpmconflict.at39
4 files changed, 41 insertions, 0 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 1e8a750a6..17f1e0f28 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -45,6 +45,8 @@ EXTRA_DIST += data/SOURCES/hello-2.0.tar.gz
EXTRA_DIST += data/RPMS/foo-1.0-1.noarch.rpm
EXTRA_DIST += data/RPMS/hello-1.0-1.i386.rpm
EXTRA_DIST += data/RPMS/hello-1.0-1.ppc64.rpm
+EXTRA_DIST += data/RPMS/hello-2.0-1.i686.rpm
+EXTRA_DIST += data/RPMS/hello-2.0-1.x86_64.rpm
EXTRA_DIST += data/SRPMS/foo-1.0-1.src.rpm
EXTRA_DIST += data/SRPMS/hello-1.0-1.src.rpm
diff --git a/tests/data/RPMS/hello-2.0-1.i686.rpm b/tests/data/RPMS/hello-2.0-1.i686.rpm
new file mode 100644
index 000000000..ae2df2541
--- /dev/null
+++ b/tests/data/RPMS/hello-2.0-1.i686.rpm
Binary files differ
diff --git a/tests/data/RPMS/hello-2.0-1.x86_64.rpm b/tests/data/RPMS/hello-2.0-1.x86_64.rpm
new file mode 100644
index 000000000..5a3557229
--- /dev/null
+++ b/tests/data/RPMS/hello-2.0-1.x86_64.rpm
Binary files differ
diff --git a/tests/rpmconflict.at b/tests/rpmconflict.at
index 89b685741..2dc12e3bc 100644
--- a/tests/rpmconflict.at
+++ b/tests/rpmconflict.at
@@ -84,6 +84,45 @@ runroot rpm -U \
[ignore])
AT_CLEANUP
+# ------------------------------
+# File conflict between colored files, prefer 64bit
+AT_SETUP([rpm -U multilib elf conflict, prefer 64bit])
+AT_KEYWORDS([install])
+AT_CHECK([
+RPMDB_CLEAR
+RPMDB_INIT
+
+runroot rpm -U --ignoreos --ignorearch --nodeps \
+ --define "_transaction_color 3" \
+ --define "_prefer_color 2" \
+ /data/RPMS/hello-2.0-1.i686.rpm \
+ /data/RPMS/hello-2.0-1.x86_64.rpm
+runroot rpm -q --qf "[[%{filestates:fstate} ]]" hello.i686 hello.x86_64
+],
+[0],
+[wrong color normal normal normal normal normal normal normal normal normal ],
+[])
+AT_CLEANUP
+
+# ------------------------------
+# File conflict between colored files, prefer 32bit
+AT_SETUP([rpm -U multilib elf conflict, prefer 32bit])
+AT_KEYWORDS([install])
+AT_CHECK([
+RPMDB_CLEAR
+RPMDB_INIT
+
+runroot rpm -U --ignoreos --ignorearch --nodeps \
+ --define "_transaction_color 3" \
+ --define "_prefer_color 1" \
+ /data/RPMS/hello-2.0-1.i686.rpm \
+ /data/RPMS/hello-2.0-1.x86_64.rpm
+runroot rpm -q --qf "[[%{filestates:fstate} ]]" hello.i686 hello.x86_64
+],
+[0],
+[normal normal normal normal normal wrong color normal normal normal normal ],
+[])
+AT_CLEANUP
# ------------------------------
# Replace directory with symlink, this is expected to fail