File: orderpackids.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 (22 lines) | stat: -rw-r--r-- 739 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl -w

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

require 't/testlib.pm';

my $proj = {};
my $proj_maint = {'kind' => 'maintenance_release'};

my @packids = qw{foo b.1:foo c.4 a.3 z z-bar z:red z-bar:green _volatile xxxx.imported_foo_bar102 b.1};
my @result;
my @expected;

@result = BSSolv::orderpackids(0, @packids);
@expected = qw{a.3 b.1 b.1:foo c.4 foo xxxx.imported_foo_bar102 z z:red z-bar z-bar:green _volatile};
is_deeply(\@result,\@expected,"check orderpackids on standard projects");

@result = BSSolv::orderpackids(1, @packids);
@expected = qw{foo z z:red z-bar z-bar:green c.4 a.3 b.1 b.1:foo xxxx.imported_foo_bar102 _volatile};
is_deeply(\@result,\@expected,"check orderpackids on maintenance_release projects");