diff options
author | seb <seb@pkgsrc.org> | 2004-11-13 21:11:18 +0000 |
---|---|---|
committer | seb <seb@pkgsrc.org> | 2004-11-13 21:11:18 +0000 |
commit | 99b79d0cf119c031010a91f3d4993563ec7ec62b (patch) | |
tree | f2834a5f587df5a4a98952b9ef3443d4092f961b /archivers/p5-Compress-Bzip2 | |
parent | e8f9cb5a42bd2445425fa0f758d64d95570f1bf0 (diff) | |
download | pkgsrc-99b79d0cf119c031010a91f3d4993563ec7ec62b.tar.gz |
Fix test suite.
Diffstat (limited to 'archivers/p5-Compress-Bzip2')
-rw-r--r-- | archivers/p5-Compress-Bzip2/distinfo | 3 | ||||
-rw-r--r-- | archivers/p5-Compress-Bzip2/patches/patch-aa | 66 |
2 files changed, 68 insertions, 1 deletions
diff --git a/archivers/p5-Compress-Bzip2/distinfo b/archivers/p5-Compress-Bzip2/distinfo index 201cde8d5db..9a35b02cde2 100644 --- a/archivers/p5-Compress-Bzip2/distinfo +++ b/archivers/p5-Compress-Bzip2/distinfo @@ -1,4 +1,5 @@ -$NetBSD: distinfo,v 1.1.1.1 2003/09/04 13:35:19 xtraeme Exp $ +$NetBSD: distinfo,v 1.2 2004/11/13 21:11:18 seb Exp $ SHA1 (Compress-Bzip2-1.01.tar.gz) = f4007dc7f800f9bea1198bc2376830913cee43f6 Size (Compress-Bzip2-1.01.tar.gz) = 18334 bytes +SHA1 (patch-aa) = fc6a172067643aeb58e484f4d8b0568b8746106f diff --git a/archivers/p5-Compress-Bzip2/patches/patch-aa b/archivers/p5-Compress-Bzip2/patches/patch-aa new file mode 100644 index 00000000000..41021507402 --- /dev/null +++ b/archivers/p5-Compress-Bzip2/patches/patch-aa @@ -0,0 +1,66 @@ +$NetBSD: patch-aa,v 1.1 2004/11/13 21:11:19 seb Exp $ + +--- t/test.t.orig 2000-11-02 20:26:16.000000000 +0000 ++++ t/test.t +@@ -1,44 +1,28 @@ +-#! /usr/bin/env perl +-## +-## vi:ts=4 +-## +-##---------------------------------------------------------------------------## +-## +- ++use Test::More tests => 4; + use Compress::Bzip2; + + my $SourceString; + my $TargetString; + my $TargetOutString; +-my $OutputFile; +-my $InputFile = ""; +- +-if ($ARGV[0]) { $InputFile=$ARGV[0]; } +-else { $InputFile='t/test.t'; } ++my $InputFile; + +-$OutputFile=">".$InputFile.".dek"; ++if (-d 't') { ++ $InputFile='t/test.t'; ++} else { ++ $InputFile='test.t'; ++} + +-if (-e $InputFile) { +- open(INPUT, $InputFile); +- while(<INPUT>) { ++open(INPUT, $InputFile); ++while(<INPUT>) { + $SourceString.=$_; +- } +- print "\n\nDie Datei wurde eingelesen.\n"; +- print "Die OrginalDatei hat die Groesse: ".length($SourceString)."\n\n"; +- +- $TargetString=Compress::Bzip2::compress($SourceString); +- +- print "Bzip-Com: ".length($TargetString)."\n"; +- +- $TargetOutString=Compress::Bzip2::decompress($TargetString); ++} ++ok(length($SourceString), 'test file'); + +- print "Bzip-Dec: ".length($TargetOutString)."\n"; ++$TargetString=Compress::Bzip2::compress($SourceString); ++ok($TargetString, 'compression'); ++# print "Bzip-Com: ".length($TargetString)."\n"; + +- open(OUTPUT, $OutputFile); +- print OUTPUT $TargetOutString; ++$TargetOutString=Compress::Bzip2::decompress($TargetString); ++ok($TargetOutString, 'decompression'); + +-} +-else { +- print "Datei ".$InputFile." konnte nicht geoeffnet werden."; +-} +-#Ende ++ok(length($TargetOutString) eq length($SourceString), 'compression/decompression'); |