diff options
author | Olivier Thauvin <nanardon@mandriva.org> | 2004-04-25 21:33:47 +0000 |
---|---|---|
committer | Olivier Thauvin <nanardon@mandriva.org> | 2004-04-25 21:33:47 +0000 |
commit | 43d0cd7061d89b760359919a78d8f10df6f215ed (patch) | |
tree | 1bf1c45d7b76cb05f43c2a19d1efae54a473bc90 /t | |
parent | d381d7b78c47ea2cddb46b9e50782372a45a62d9 (diff) | |
download | perl-URPM-43d0cd7061d89b760359919a78d8f10df6f215ed.tar perl-URPM-43d0cd7061d89b760359919a78d8f10df6f215ed.tar.gz perl-URPM-43d0cd7061d89b760359919a78d8f10df6f215ed.tar.bz2 perl-URPM-43d0cd7061d89b760359919a78d8f10df6f215ed.tar.xz perl-URPM-43d0cd7061d89b760359919a78d8f10df6f215ed.zip |
- make parse.t pass all test
- add $pkg->queryformat test
Diffstat (limited to 't')
-rw-r--r-- | t/parse.t | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -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"); |