summaryrefslogtreecommitdiffstats
path: root/t/superuser--prefer2.t
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@mandriva.com>2009-01-07 17:46:43 +0000
committerChristophe Fergeau <cfergeau@mandriva.com>2009-01-07 17:46:43 +0000
commitf5f7b1c738fcee4290e164da3a43d11903ba5f07 (patch)
treef0f82745143b57fa2cd75db3172d06c8a9348474 /t/superuser--prefer2.t
parent98f3a57bd81b316d87bb4f7e1fdff45f8d03bbfd (diff)
downloadurpmi-f5f7b1c738fcee4290e164da3a43d11903ba5f07.tar
urpmi-f5f7b1c738fcee4290e164da3a43d11903ba5f07.tar.gz
urpmi-f5f7b1c738fcee4290e164da3a43d11903ba5f07.tar.bz2
urpmi-f5f7b1c738fcee4290e164da3a43d11903ba5f07.tar.xz
urpmi-f5f7b1c738fcee4290e164da3a43d11903ba5f07.zip
Add new testcase for bug #46874
Diffstat (limited to 't/superuser--prefer2.t')
-rw-r--r--t/superuser--prefer2.t30
1 files changed, 30 insertions, 0 deletions
diff --git a/t/superuser--prefer2.t b/t/superuser--prefer2.t
new file mode 100644
index 00000000..b92a11b8
--- /dev/null
+++ b/t/superuser--prefer2.t
@@ -0,0 +1,30 @@
+#!/usr/bin/perl
+
+# testcase for bug #46874
+# a requires both bb and b2
+# bb is provided by both b1 and b2
+# => b1 must be picked over b2
+#
+# d is the same as a with b1 => c2 and b2 => c1
+# (needed to ensure both ordering works)
+#
+use strict;
+use lib '.', 't';
+use helper;
+use urpm::util;
+use Test::More 'no_plan';
+
+need_root_and_prepare();
+
+my $name = 'prefer2';
+urpmi_addmedia("$name $::pwd/media/$name");
+
+test('a', ['a', 'b2']);
+test('d', ['d', 'c1']);
+
+sub test {
+ my ($pkg, $result) = @_;
+
+ urpmi("--auto $pkg");
+ check_installed_and_remove(@$result);
+}