aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/parse.t13
1 files changed, 7 insertions, 6 deletions
diff --git a/t/parse.t b/t/parse.t
index 2d5e077..85cbe1c 100644
--- a/t/parse.t
+++ b/t/parse.t
@@ -4,7 +4,7 @@
use strict ;
use warnings ;
-use Test::More tests => 13;
+use Test::More tests => 15;
use URPM;
use URPM::Build;
use URPM::Query;
@@ -12,14 +12,18 @@ use URPM::Query;
my $a = new URPM;
ok($a);
+END { unlink 'hdlist.cz' }
+
my ($start, $end) = $a->parse_rpms_build_headers(rpms => [ "test-rpm-1.0-1mdk.noarch.rpm" ], keep_all_tags => 1);
ok(@{$a->{depslist}} == 1);
my $pkg = $a->{depslist}[0];
ok($pkg);
-ok($a->list_rpm_tag);
+my %tags = $a->list_rpm_tag;
+ok(keys %tags);
ok($pkg->get_tag(1000) eq 'test-rpm');
ok($pkg->get_tag(1001) eq '1.0');
ok($pkg->get_tag(1002) eq '1mdk');
+ok($pkg->queryformat("%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}") eq "test-rpm-1.0-1mdk.noarch");
$a->build_hdlist(start => 0,
end => $#{$a->{depslist}},
@@ -36,8 +40,5 @@ ok($pkg);
ok($pkg->get_tag(1000) eq 'test-rpm');
ok($pkg->get_tag(1001) eq '1.0');
ok($pkg->get_tag(1002) eq '1mdk');
-
-
-
-
+ok($pkg->queryformat("%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}") eq "test-rpm-1.0-1mdk.noarch");