diff options
-rw-r--r-- | URPM.xs | 2 | ||||
-rw-r--r-- | t/parse.t | 13 |
2 files changed, 7 insertions, 8 deletions
@@ -3201,8 +3201,6 @@ Urpm_list_rpm_tag(urpm=Nullsv) PPCODE: read_config_files(0); - - for (i = 0; i < rpmTagTableSize; i++) { XPUSHs(sv_2mortal(newSVpv(rpmTagTable[i].name + 7, 0))); XPUSHs(sv_2mortal(newSViv(rpmTagTable[i].val))); @@ -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"); |