|
|
@@ -16,7 +16,7 @@
|
|
|
use strict;
|
|
|
use warnings;
|
|
|
|
|
|
-use Test::More tests => 25;
|
|
|
+use Test::More tests => 26;
|
|
|
use Dpkg::Arch qw(get_host_arch);
|
|
|
|
|
|
use_ok('Dpkg::Deps');
|
|
|
@@ -31,6 +31,10 @@ my $dep_multiline = deps_parse($field_multiline);
|
|
|
$dep_multiline->sort();
|
|
|
is($dep_multiline->output(), $field_multiline_sorted, 'Parse, sort and output');
|
|
|
|
|
|
+my $dep_sorted = deps_parse('pkgz, pkgz | pkga, pkga (>= 1.0), pkgz (<= 2.0)');
|
|
|
+$dep_sorted->sort();
|
|
|
+is($dep_sorted->output(), 'pkga (>= 1.0), pkgz, pkgz | pkga, pkgz (<= 2.0)', 'Check sort() algorithm');
|
|
|
+
|
|
|
my $dep_subset = deps_parse('libatk1.0-0 (>> 1.10), libc6, libcairo2');
|
|
|
is($dep_multiline->implies($dep_subset), 1, 'Dep implies subset of itself');
|
|
|
is($dep_subset->implies($dep_multiline), undef, "Subset doesn't imply superset");
|