File: ordep.t

package info (click to toggle)
libbssolv-perl 0.17%2Bgit20250403%2Bfc787703f7f6-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 396 kB
  • sloc: perl: 785; makefile: 12
file content (35 lines) | stat: -rw-r--r-- 617 bytes parent folder | download | duplicates (7)
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
32
33
34
35
#!/usr/bin/perl -w

use strict;
use Test::More tests => 4;

require 't/testlib.pm';

my $repo = <<'EOR';
P: a = 1-1
R: x | y
P: b = 1-1
R: d | e
P: c = 1-1
R: d | f
P: d = 1-1
P: e = 1-1
P: f = 1-1
P: g = 1-1
R: x | e | d
EOR

my $config = setuptest($repo, "Binarytype: deb\nPrefer: f\n");
my @r;

@r = expand($config, 'a');
is_deeply(\@r, [undef, 'nothing provides x | y needed by a'], 'install a');

@r = expand($config, 'b');
is_deeply(\@r, [1, 'b', 'd'], 'install b');

@r = expand($config, 'c');
is_deeply(\@r, [1, 'c', 'f'], 'install c');

@r = expand($config, 'g');
is_deeply(\@r, [1, 'e', 'g'], 'install g');