diff options
author | Francois Pons <fpons@mandriva.com> | 2002-06-05 16:44:24 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2002-06-05 16:44:24 +0000 |
commit | 977a0031a904f6690d377d184a5461f639d49201 (patch) | |
tree | 53577423f224d0feba7e310fa8b8a8fc82ab2205 /t/rpmdb.t | |
parent | b9ffa68234ad52a371edd9704fdcd51d0948b886 (diff) | |
download | perl-URPM-977a0031a904f6690d377d184a5461f639d49201.tar perl-URPM-977a0031a904f6690d377d184a5461f639d49201.tar.gz perl-URPM-977a0031a904f6690d377d184a5461f639d49201.tar.bz2 perl-URPM-977a0031a904f6690d377d184a5461f639d49201.tar.xz perl-URPM-977a0031a904f6690d377d184a5461f639d49201.zip |
0.02-3mdk
Diffstat (limited to 't/rpmdb.t')
-rw-r--r-- | t/rpmdb.t | 28 |
1 files changed, 15 insertions, 13 deletions
@@ -14,19 +14,21 @@ use URPM; print "1..5\n"; -my $db; -ok(1, $db = URPM::DB::open); - -my @all_pkgs_extern = sort { $a cmp $b } split '\n', `rpm -qa`; -ok(2, @all_pkgs_extern > 0); - -my @all_pkgs; -my $count = $db->traverse(sub { - my ($pkg) = @_; - my ($name, $version, $release, $arch) = $pkg->fullname; - $arch or return; - push @all_pkgs, "$name-$version-$release"; - }); +my ($count, @all_pkgs_extern, @all_pkgs); +{ + my $db; + ok(1, $db = URPM::DB::open); + + @all_pkgs_extern = sort { $a cmp $b } split '\n', `rpm -qa`; + ok(2, @all_pkgs_extern > 0); + + $count = $db->traverse(sub { + my ($pkg) = @_; + my ($name, $version, $release, $arch) = $pkg->fullname; + $arch or return; + push @all_pkgs, "$name-$version-$release"; + }); +} ok(3, $count == @all_pkgs_extern); ok(4, $count == @all_pkgs); |