aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorJason Woodward2012-01-08 10:18:55 +0000
committerJason Woodward2012-01-08 11:51:52 +0000
commit7517a5ba3280de332145985bd6d1f34f656179c2 (patch)
tree41d6e286d76bf3260ba9de70419a6ea59bb2d6eb /t
parentafebb536b69bb7040bee5fc93f84dfeec1bbe904 (diff)
downloadslapt-get-7517a5ba3280de332145985bd6d1f34f656179c2.tar.gz
[HACK] prefer our architecture in x86/x86_64 multilib package comparison
Diffstat (limited to 't')
-rw-r--r--t/test_packages.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/t/test_packages.c b/t/test_packages.c
index 95aee66..301df6d 100644
--- a/t/test_packages.c
+++ b/t/test_packages.c
@@ -289,6 +289,14 @@ START_TEST (test_version)
fail_unless (slapt_cmp_pkg_versions("1.4rc5-i486-2","1.4rc4-i486-2") > 0);
fail_unless (slapt_cmp_pkg_versions("1.3.35-i486-2_slack10.2","1.3.35-i486-1") > 0);
+
+#if defined(__x86_64__)
+ fail_unless (slapt_cmp_pkg_versions("4.1-x86_64-1","4.1-i486-1") > 0);
+ fail_unless (slapt_cmp_pkg_versions("4.1-i486-1","4.1-x86_64-1") < 0);
+#elif defined(__i386__)
+ fail_unless (slapt_cmp_pkg_versions("4.1-i486-1","4.1-x86_64-1") > 0);
+ fail_unless (slapt_cmp_pkg_versions("4.1-x86_64-1","4.1-486-1") < 0);
+#endif
}
END_TEST