summaryrefslogtreecommitdiffstats
path: root/t/superuser--prefer2.t
blob: e8a7f7ae9341deaae04109ac6e6b7398475151c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/perl
# vim:et:ai:ts=4:sts=4:sw=4

# 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);
}