aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-06-05 16:44:24 +0000
committerFrancois Pons <fpons@mandriva.com>2002-06-05 16:44:24 +0000
commit977a0031a904f6690d377d184a5461f639d49201 (patch)
tree53577423f224d0feba7e310fa8b8a8fc82ab2205 /t
parentb9ffa68234ad52a371edd9704fdcd51d0948b886 (diff)
downloadperl-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')
-rw-r--r--t/rpmdb.t28
1 files changed, 15 insertions, 13 deletions
diff --git a/t/rpmdb.t b/t/rpmdb.t
index c6a1040..898588d 100644
--- a/t/rpmdb.t
+++ b/t/rpmdb.t
@@ -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);