aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorOlivier Thauvin <nanardon@mandriva.org>2004-12-05 07:13:01 +0000
committerOlivier Thauvin <nanardon@mandriva.org>2004-12-05 07:13:01 +0000
commite13a7b1806e5b9f04def1f67f897bd8695b2e91a (patch)
tree6916399bdb2268767d4af9405f1f1be7f4a79ccd /t
parent740584c3e5d64c76819992c85ae10d109993c612 (diff)
downloadrpmtools-e13a7b1806e5b9f04def1f67f897bd8695b2e91a.tar
rpmtools-e13a7b1806e5b9f04def1f67f897bd8695b2e91a.tar.gz
rpmtools-e13a7b1806e5b9f04def1f67f897bd8695b2e91a.tar.bz2
rpmtools-e13a7b1806e5b9f04def1f67f897bd8695b2e91a.tar.xz
rpmtools-e13a7b1806e5b9f04def1f67f897bd8695b2e91a.zip
- fix data length to write
- test: use strict ;) then fix it !!
Diffstat (limited to 't')
-rwxr-xr-xt/01packdrakeng.t10
1 files changed, 6 insertions, 4 deletions
diff --git a/t/01packdrakeng.t b/t/01packdrakeng.t
index 27f0527..0273604 100755
--- a/t/01packdrakeng.t
+++ b/t/01packdrakeng.t
@@ -2,6 +2,7 @@
# $Id$
+use strict;
use Test::More tests => 16;
use Digest::MD5;
@@ -16,7 +17,7 @@ sub clean_test_files {
sub create_test_files {
my ($number) = @_;
my %created;
- -d test or mkdir test;
+ -d "test" or mkdir "test";
foreach my $n (1 .. $number||10) {
my $size = int(rand(1024));
# push(@created, "test/$size");
@@ -29,7 +30,8 @@ sub create_test_files {
}
sub create_know_file {
- foreach my $letter (a..z) {
+ my %created;
+ foreach my $letter ('a' .. 'z') {
open(my $h, "> test/$letter");
foreach (1 .. 3456) {
printf $h "%s\n", $letter x 33;
@@ -72,8 +74,8 @@ sub test_packing {
clean_test_files();
ok($pack = packdrakeng->open(%$pack_param), "Re-opening the archive");
- ok($pack->extract(undef, keys(%createdfiles)), "extracting files");
- ok(check_files(%createdfiles), "Checking md5sum for extracted files");
+ ok($pack->extract(undef, keys(%$listfiles)), "extracting files");
+ ok(check_files(%$listfiles), "Checking md5sum for extracted files");
$pack = undef;
}