summaryrefslogtreecommitdiff
path: root/ext/Compress
diff options
context:
space:
mode:
authorPaul Marquess <paul.marquess@btinternet.com>2006-01-08 23:47:33 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-01-09 10:16:23 +0000
commit9f2e35140733c7b8f4ab179f11bf740ca3d2130e (patch)
treebc2c8c6e9c28ce6b8ec5911f5ae1887ee172af1b /ext/Compress
parent1fcb18de6aa4bd3b565067cad38df0ca202f89d0 (diff)
downloadperl-9f2e35140733c7b8f4ab179f11bf740ca3d2130e.tar.gz
RE: Failing tests on VMS blead@26652
From: "Paul Marquess" <Paul.Marquess@ntlworld.com> Message-ID: <00cd01c614ad$e815d340$6401a8c0@myopwv.com> p4raw-id: //depot/perl@26751
Diffstat (limited to 'ext/Compress')
-rw-r--r--ext/Compress/Zlib/t/03zlib-v1.t6
-rw-r--r--ext/Compress/Zlib/t/04def.t42
-rw-r--r--ext/Compress/Zlib/t/05examples.t10
-rw-r--r--ext/Compress/Zlib/t/06gzsetp.t4
-rw-r--r--ext/Compress/Zlib/t/08encoding.t4
-rw-r--r--ext/Compress/Zlib/t/09gziphdr.t12
-rw-r--r--ext/Compress/Zlib/t/10defhdr.t3
-rw-r--r--ext/Compress/Zlib/t/11truncate.t24
-rw-r--r--ext/Compress/Zlib/t/13prime.t4
-rw-r--r--ext/Compress/Zlib/t/14gzopen.t34
-rw-r--r--ext/Compress/Zlib/t/15multi.t3
-rw-r--r--ext/Compress/Zlib/t/16oneshot.t24
-rw-r--r--ext/Compress/Zlib/t/19destroy.t7
-rw-r--r--ext/Compress/Zlib/t/20tied.t12
-rw-r--r--ext/Compress/Zlib/t/21newtied.t12
-rw-r--r--ext/Compress/Zlib/t/22merge.t18
-rw-r--r--ext/Compress/Zlib/t/23misc.t6
17 files changed, 73 insertions, 152 deletions
diff --git a/ext/Compress/Zlib/t/03zlib-v1.t b/ext/Compress/Zlib/t/03zlib-v1.t
index 92a7f1619a..093052045f 100644
--- a/ext/Compress/Zlib/t/03zlib-v1.t
+++ b/ext/Compress/Zlib/t/03zlib-v1.t
@@ -363,7 +363,7 @@ EOM
ok $uncomp eq $buffer ;
- unlink $name ;
+ 1 while unlink $name ;
# now check that memGunzip can deal with it.
my $ungzip = Compress::Zlib::memGunzip($dest) ;
@@ -442,7 +442,7 @@ EOM
ok ! defined $ungzip ;
- unlink $name ;
+ 1 while unlink $name ;
# check corrupt header -- too short
$dest = "x" ;
@@ -538,7 +538,7 @@ EOM
my $unc = Compress::Zlib::memGunzip($compr) ;
ok defined $unc ;
ok $buffer eq $unc ;
- unlink $name ;
+ 1 while unlink $name ;
}
{
diff --git a/ext/Compress/Zlib/t/04def.t b/ext/Compress/Zlib/t/04def.t
index b41184b808..fb9e4bd132 100644
--- a/ext/Compress/Zlib/t/04def.t
+++ b/ext/Compress/Zlib/t/04def.t
@@ -235,8 +235,7 @@ EOM
#========================================
- my $name = "test.gz" ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
my $hello = <<EOM ;
hello world
@@ -273,8 +272,7 @@ EOM
#========================================
- my $name = "test.gz" ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
my $hello = <<EOM ;
hello world
@@ -357,8 +355,7 @@ EOM
}
{
- my $name = "test.gz" ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
my $hello = <<EOM ;
hello world
@@ -521,8 +518,7 @@ EOM
#================================
- my $name = "test.gz" ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
my $hello = <<EOM ;
hello world
@@ -570,8 +566,7 @@ EOM
# Write
# these tests come almost 100% from IO::String
- my $name = "test.gz" ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
my $io = $CompressClass->new($name);
@@ -639,8 +634,7 @@ and a single line.
EOT
- my $name = "test.gz" ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
my %opts = () ;
%opts = (CRC32 => 1, Adler32 => 1)
@@ -773,8 +767,7 @@ and a single line.
EOT
- my $name = "test.gz" ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
writeFile($name, $str);
my @tmp;
@@ -905,8 +898,7 @@ EOT
{
title "Read Tests - buf length $bufsize, Transparent $trans, Append $append" ;
- my $name = "testz.gz" ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
if ($trans) {
writeFile($name, $str) ;
@@ -950,8 +942,7 @@ EOT
my $buffer ;
my $buff ;
- my $name = "test.gz" ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
my $first = "beginning" ;
my $last = "the end" ;
@@ -1055,8 +1046,7 @@ EOT
{
title "$CompressClass -- Append $append, Output to $fb" ;
- my $name = "test.gz" ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
my $already = 'already';
my $buffer = $already;
@@ -1128,8 +1118,7 @@ EOT
my $comp_len = length $compressed;
$compressed .= $appended;
- my $name = "test.gz" ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
my $input ;
writeFile ($name, $compressed);
@@ -1171,8 +1160,7 @@ EOT
{
title "$UncompressClass -- Append $append" ;
- my $name = "test.gz" ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
my $string = "appended";
my $compressed ;
@@ -1207,8 +1195,7 @@ EOT
{
title "ungetc, File $file, Transparent $trans" ;
- my $name = "test.gz" ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
my $string = 'abcdeABCDE';
my $b ;
@@ -1372,8 +1359,7 @@ EOT
{
title "write tests - invalid data" ;
- #my $name1 = "test.gz" ;
- #my $lex = new LexFile $name1 ;
+ #my $lex = new LexFile my $name1 ;
my $Answer ;
#ok ! -e $name1, " File $name1 does not exist";
diff --git a/ext/Compress/Zlib/t/05examples.t b/ext/Compress/Zlib/t/05examples.t
index 81c75a117f..782fc4a3df 100644
--- a/ext/Compress/Zlib/t/05examples.t
+++ b/ext/Compress/Zlib/t/05examples.t
@@ -68,9 +68,9 @@ my @hello2 = grep(s/$/\n/, split(/\n/, $hello2)) ;
my $file1 = "hello1.gz" ;
my $file2 = "hello2.gz" ;
my $stderr = "err.out" ;
-unlink $stderr ;
-unlink $file1, $file2 ;
+for ($file1, $file2, $stderr) { 1 while unlink $_ } ;
+
my $gz = gzopen($file1, "wb");
$gz->gzwrite($hello1);
@@ -86,7 +86,7 @@ sub check
my $expected = shift ;
my $stderr = 'err.out';
- unlink $stderr;
+ 1 while unlink $stderr;
my $cmd = "$command 2>$stderr";
my $stdout = `$cmd` ;
@@ -106,7 +106,7 @@ sub check
diag "Test called from $file, line $line";
}
- unlink $stderr;
+ 1 while unlink $stderr;
}
# gzcat
@@ -129,7 +129,7 @@ title "gzgrep";
check "$Perl ${examples}/gzgrep the $file1 $file2",
join('', grep(/the/, @hello1, @hello2));
-unlink $file1, $file2 ;
+for ($file1, $file2) { 1 while unlink $_ } ;
# filtdef/filtinf
diff --git a/ext/Compress/Zlib/t/06gzsetp.t b/ext/Compress/Zlib/t/06gzsetp.t
index 68dd0d1108..eaba1f4f8e 100644
--- a/ext/Compress/Zlib/t/06gzsetp.t
+++ b/ext/Compress/Zlib/t/06gzsetp.t
@@ -56,8 +56,7 @@ is Compress::Zlib::zlib_version, ZLIB_VERSION,
my ($input, $err, $answer, $X, $status, $Answer);
- my $name = "test.gz" ;
- unlink $name ;
+ my $lex = new LexFile my $name;
ok my $x = gzopen($name, "wb");
$input .= $hello;
@@ -90,7 +89,6 @@ is Compress::Zlib::zlib_version, ZLIB_VERSION,
ok $k->gzeof ;
ok ! $k->gzclose ;
ok $k->gzeof ;
- unlink $name;
}
diff --git a/ext/Compress/Zlib/t/08encoding.t b/ext/Compress/Zlib/t/08encoding.t
index 9eda40d835..4e32d647db 100644
--- a/ext/Compress/Zlib/t/08encoding.t
+++ b/ext/Compress/Zlib/t/08encoding.t
@@ -95,11 +95,11 @@ if(0)
{
title "gzopen" ;
- my $name = "test.gz" ;
my $s = "\x{df}\x{100}";
my $byte_len = length( Encode::encode_utf8($s) );
my ($uncomp) ;
+ my $lex = new LexFile my $name ;
ok my $fil = gzopen($name, "wb"), " gzopen for write ok" ;
is $fil->gzwrite(Encode::encode_utf8($s)), $byte_len, " wrote $byte_len bytes" ;
@@ -113,8 +113,6 @@ if(0)
ok ! $fil->gzclose, "gzclose ok" ;
- unlink $name ;
-
is $s, Encode::decode_utf8($uncomp), " decode_utf8 ok" ;
}
diff --git a/ext/Compress/Zlib/t/09gziphdr.t b/ext/Compress/Zlib/t/09gziphdr.t
index e7b52a0668..fc74060771 100644
--- a/ext/Compress/Zlib/t/09gziphdr.t
+++ b/ext/Compress/Zlib/t/09gziphdr.t
@@ -37,8 +37,7 @@ BEGIN {
my $ThisOS_code = $Compress::Zlib::gzip_os_code;
-my $name = "test.gz" ;
-my $lex = new LexFile $name ;
+my $lex = new LexFile my $name ;
{
title "Check Defaults";
@@ -706,8 +705,7 @@ EOM
ok $x->close ;
substr($truncated, $index) = '' ;
- #my $name = "trunc.gz" ;
- #my $lex = new LexFile $name ;
+ #my $lex = new LexFile my $name ;
#writeFile($name, $truncated) ;
#my $g = new IO::Uncompress::Gunzip $name, -Transparent => 0;
@@ -758,8 +756,7 @@ EOM
ok $x->close ;
substr($truncated, $index) = '' ;
- #my $name = "trunc.gz" ;
- #my $lex = new LexFile $name ;
+ #my $lex = new LexFile my $name ;
#writeFile($name, $truncated) ;
#my $g = new IO::Uncompress::Gunzip $name, -Transparent => 0;
@@ -784,8 +781,7 @@ EOM
ok $x->close ;
substr($truncated, $index) = '' ;
- my $name = "trunc.gz" ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
writeFile($name, $truncated) ;
my $g = new IO::Uncompress::Gunzip $name, -Transparent => 0;
diff --git a/ext/Compress/Zlib/t/10defhdr.t b/ext/Compress/Zlib/t/10defhdr.t
index 67b50d820d..f12b0d578d 100644
--- a/ext/Compress/Zlib/t/10defhdr.t
+++ b/ext/Compress/Zlib/t/10defhdr.t
@@ -107,8 +107,7 @@ sub printHeaderInfo
# Check the Deflate Header Parameters
#========================================
-my $name = "test.gz" ;
-my $lex = new LexFile $name ;
+my $lex = new LexFile my $name ;
{
title "Check default header settings" ;
diff --git a/ext/Compress/Zlib/t/11truncate.t b/ext/Compress/Zlib/t/11truncate.t
index afb65d35e9..d0acbd88fb 100644
--- a/ext/Compress/Zlib/t/11truncate.t
+++ b/ext/Compress/Zlib/t/11truncate.t
@@ -101,9 +101,7 @@ foreach my $CompressClass ('IO::Compress::Gzip', 'IO::Compress::Deflate')
title "Fingerprint Truncation";
foreach my $i (1)
{
- my $name = "test.gz" ;
- unlink $name ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
ok 1, "Length $i" ;
my $part = substr($compressed, 0, $i);
@@ -134,9 +132,7 @@ foreach my $CompressClass ('IO::Compress::Gzip', 'IO::Compress::Deflate')
#
foreach my $i (2 .. $header_size -1)
{
- my $name = "test.gz" ;
- unlink $name ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
ok 1, "Length $i" ;
my $part = substr($compressed, 0, $i);
@@ -151,9 +147,7 @@ foreach my $CompressClass ('IO::Compress::Gzip', 'IO::Compress::Deflate')
foreach my $i ($header_size .. length($compressed) - 1 - $trailer_size)
{
- my $name = "test.gz" ;
- unlink $name ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
ok 1, "Length $i" ;
my $part = substr($compressed, 0, $i);
@@ -178,9 +172,7 @@ foreach my $CompressClass ('IO::Compress::Gzip', 'IO::Compress::Deflate')
{
foreach my $lax (0, 1)
{
- my $name = "test.gz" ;
- unlink $name ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
ok 1, "Length $i, Lax $lax" ;
my $part = substr($compressed, 0, $i);
@@ -257,9 +249,7 @@ foreach my $CompressClass ( 'IO::Compress::RawDeflate')
foreach my $i (0 .. $blocksize)
{
- my $name = "test.gz" ;
- unlink $name ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
ok 1, "Length $i" ;
my $part = substr($compressed, 0, $i);
@@ -284,9 +274,7 @@ foreach my $CompressClass ( 'IO::Compress::RawDeflate')
foreach my $i ($blocksize+1 .. length($compressed)-1)
{
- my $name = "test.gz" ;
- unlink $name ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
ok 1, "Length $i" ;
my $part = substr($compressed, 0, $i);
diff --git a/ext/Compress/Zlib/t/13prime.t b/ext/Compress/Zlib/t/13prime.t
index cb2233b289..04116e23dd 100644
--- a/ext/Compress/Zlib/t/13prime.t
+++ b/ext/Compress/Zlib/t/13prime.t
@@ -99,9 +99,7 @@ foreach my $CompressClass ('IO::Compress::Gzip',
for my $useBuf (0 .. 1)
{
print "#\n# BlockSize $blocksize, Length $i, Buffer $useBuf\n#\n" ;
- my $name = "test.gz" ;
- unlink $name ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
my $prime = substr($compressed, 0, $i);
my $rest = substr($compressed, $i);
diff --git a/ext/Compress/Zlib/t/14gzopen.t b/ext/Compress/Zlib/t/14gzopen.t
index 5d8342b51b..141b7014f7 100644
--- a/ext/Compress/Zlib/t/14gzopen.t
+++ b/ext/Compress/Zlib/t/14gzopen.t
@@ -73,7 +73,7 @@ ok $fil->gzeof() ;
ok ! $fil->gzclose ;
ok $fil->gzeof() ;
-unlink $name ;
+1 while unlink $name ;
ok $hello eq $uncomp ;
@@ -109,7 +109,7 @@ ok $fil->gzeof() ;
ok $gzerrno == 0
or print "# gzerrno is $gzerrno\n" ;
-unlink $name ;
+1 while unlink $name ;
ok $number == $uncomp ;
ok $number eq $uncomp ;
@@ -148,7 +148,7 @@ ok $contents eq $uncompressed
ok $f->gzeof() ;
ok ! $f->gzclose ;
-unlink($file) ;
+1 while unlink($file) ;
# gzip - readline tests
# ======================
@@ -193,7 +193,7 @@ is $fil->gzreadline($line), 0;
ok $fil->gzeof() ;
ok ! $fil->gzclose ;
ok $fil->gzeof() ;
-unlink($name) ;
+1 while unlink($name) ;
# a text file with a very long line (bigger than the internal buffer)
my $line1 = ("abcdefghijklmnopq" x 2000) . "\n" ;
@@ -220,7 +220,7 @@ ok $fil->gzeof() ;
ok ! $fil->gzclose ;
ok $fil->gzeof() ;
-unlink $name ;
+1 while unlink $name ;
# a text file which is not termined by an EOL
@@ -246,7 +246,7 @@ is $got[1], $line2 ;
ok $fil->gzeof() ;
ok ! $fil->gzclose ;
-unlink $name ;
+1 while unlink $name ;
{
@@ -293,8 +293,6 @@ unlink $name ;
my $hello = "hello" ;
my $len = length $hello ;
- unlink $name ;
-
my $f = new IO::File ">$name" ;
ok $f;
@@ -316,7 +314,6 @@ unlink $name ;
ok ! $fil->gzclose ;
ok $fil->gzeof() ;
- unlink $name ;
is $uncomp, $hello, "got expected output" ;
@@ -332,8 +329,6 @@ unlink $name ;
my $hello = "hello" ;
my $len = length $hello ;
- unlink $name ;
-
open F, ">$name" ;
my $fil;
@@ -354,8 +349,6 @@ unlink $name ;
ok ! $fil->gzclose ;
ok $fil->gzeof() ;
- unlink $name ;
-
is $uncomp, $hello ;
@@ -373,8 +366,6 @@ foreach my $stdio ( ['-', '-'], [*STDIN, *STDOUT])
my $hello = "hello" ;
my $len = length $hello ;
- unlink $name ;
-
ok open(SAVEOUT, ">&STDOUT"), " save STDOUT";
my $dummy = fileno SAVEOUT;
ok open(STDOUT, ">$name"), " redirect STDOUT" ;
@@ -407,8 +398,6 @@ foreach my $stdio ( ['-', '-'], [*STDIN, *STDOUT])
open(STDIN, "<&SAVEIN");
- unlink $name ;
-
is $uncomp, $hello ;
@@ -420,8 +409,6 @@ foreach my $stdio ( ['-', '-'], [*STDIN, *STDOUT])
my $fil;
- unlink $name ;
-
# missing parameters
eval ' $fil = gzopen() ' ;
like $@, mkEvalErr('Not enough arguments for Compress::Zlib::gzopen'),
@@ -474,8 +461,7 @@ foreach my $stdio ( ['-', '-'], [*STDIN, *STDOUT])
SKIP:
{
- my $name ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
writeFile($name, "abc");
chmod 0444, $name ;
@@ -494,8 +480,7 @@ foreach my $stdio ( ['-', '-'], [*STDIN, *STDOUT])
SKIP:
{
- my $name ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
writeFile($name, "abc");
chmod 0222, $name ;
@@ -516,8 +501,7 @@ foreach my $stdio ( ['-', '-'], [*STDIN, *STDOUT])
title "gzseek" ;
my $buff ;
- my $name ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
my $first = "beginning" ;
my $last = "the end" ;
diff --git a/ext/Compress/Zlib/t/15multi.t b/ext/Compress/Zlib/t/15multi.t
index 2cb6dec3fc..0b65ef6371 100644
--- a/ext/Compress/Zlib/t/15multi.t
+++ b/ext/Compress/Zlib/t/15multi.t
@@ -81,8 +81,7 @@ foreach my $CompressClass ('IO::Compress::Gzip',
}
- my $name = "test.gz" ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
my $output ;
if ($fb eq 'buffer')
{
diff --git a/ext/Compress/Zlib/t/16oneshot.t b/ext/Compress/Zlib/t/16oneshot.t
index d5ad4622cc..d382ba00a2 100644
--- a/ext/Compress/Zlib/t/16oneshot.t
+++ b/ext/Compress/Zlib/t/16oneshot.t
@@ -84,11 +84,10 @@ foreach my $bit ('IO::Compress::Gzip',
like $@, mkErr("^$TopType: input filename is undef or null string"),
' Input filename empty' ;
- $in = 'abc';
- my $lex1 = new LexFile($in) ;
- writeFile($in, "abc");
- my $out = $in ;
- eval { $a = $Func->($in, $out) ;} ;
+ my $lex1 = new LexFile my $in1 ;
+ writeFile($in1, "abc");
+ my $out = $in1 ;
+ eval { $a = $Func->($in1, $out) ;} ;
like $@, mkErr("^$TopType: input and output filename are identical"),
' Input and Output filename are the same';
@@ -96,8 +95,7 @@ foreach my $bit ('IO::Compress::Gzip',
like $@, mkErr("^$TopType: input and output buffer are identical"),
' Input and Output buffer are the same';
- my $out_file = "abcde.out";
- my $lex = new LexFile($out_file) ;
+ my $lex = new LexFile my $out_file ;
open OUT, ">$out_file" ;
eval { $a = $Func->(\*OUT, \*OUT) ;} ;
like $@, mkErr("^$TopType: input and output handle are identical"),
@@ -1166,8 +1164,8 @@ foreach my $bit ('IO::Uncompress::Gunzip',
my $incumbent = "incumbent data" ;
- my ($file1, $file2) = ("file1", "file2");
- my $lex = new LexFile($file1, $file2) ;
+ #my ($file1, $file2) = ("file1", "file2");
+ my $lex = new LexFile(my $file1, my $file2) ;
writeFile($file1, compressBuffer($TopType,"data1"));
writeFile($file2, compressBuffer($TopType,"data2"));
@@ -1339,10 +1337,7 @@ foreach my $TopType ('IO::Compress::Gzip::gzip',
title "More write tests" ;
- my $file1 = "file1" ;
- my $file2 = "file2" ;
- my $file3 = "file3" ;
- my $lex = new LexFile $file1, $file2, $file3 ;
+ my $lex = new LexFile(my $file1, my $file2, my $file3) ;
writeFile($file1, "F1");
writeFile($file2, "F2");
@@ -1438,8 +1433,7 @@ sub gzipGetHeader
{
title "Check gzip header default NAME & MTIME settings" ;
- my $file1 = "file1" ;
- my $lex = new LexFile $file1;
+ my $lex = new LexFile my $file1;
my $content = "hello ";
my $hdr ;
diff --git a/ext/Compress/Zlib/t/19destroy.t b/ext/Compress/Zlib/t/19destroy.t
index 2b2d576d59..0d4eb757de 100644
--- a/ext/Compress/Zlib/t/19destroy.t
+++ b/ext/Compress/Zlib/t/19destroy.t
@@ -43,9 +43,7 @@ foreach my $CompressClass ('IO::Compress::Gzip',
{
# Check that the class destructor will call close
- my $name = "test.gz" ;
- unlink $name ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
my $hello = <<EOM ;
hello world
@@ -66,8 +64,7 @@ EOM
# Tied filehandle destructor
- my $name = "test.gz" ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
my $hello = <<EOM ;
hello world
diff --git a/ext/Compress/Zlib/t/20tied.t b/ext/Compress/Zlib/t/20tied.t
index 72d8d66421..3b18db1bd1 100644
--- a/ext/Compress/Zlib/t/20tied.t
+++ b/ext/Compress/Zlib/t/20tied.t
@@ -152,8 +152,7 @@ foreach my $CompressClass ('IO::Compress::Gzip',
# Write
# these tests come almost 100% from IO::String
- my $name = "test.gz" ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
my $io = $CompressClass->new($name);
@@ -216,8 +215,7 @@ and a single line.
EOT
- my $name = "test.gz" ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
my $iow = new $CompressClass $name ;
print $iow $str ;
@@ -348,8 +346,7 @@ and a single line.
EOT
- my $name = "test.gz" ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
writeFile($name, $str);
my @tmp;
@@ -480,8 +477,7 @@ EOT
{
title "Read Tests - buf length $bufsize, Transparent $trans, Append $append" ;
- my $name = "testz.gz" ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
if ($trans) {
writeFile($name, $str) ;
diff --git a/ext/Compress/Zlib/t/21newtied.t b/ext/Compress/Zlib/t/21newtied.t
index 3a416fa106..eb642b6c0b 100644
--- a/ext/Compress/Zlib/t/21newtied.t
+++ b/ext/Compress/Zlib/t/21newtied.t
@@ -99,8 +99,7 @@ foreach my $CompressClass ('IO::Compress::Gzip',
# Write
# these tests come almost 100% from IO::String
- my $name = "test.gz" ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
my $io = $CompressClass->new($name);
@@ -167,8 +166,7 @@ and a single line.
EOT
- my $name = "test.gz" ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
my $iow = new $CompressClass $name ;
print $iow $str ;
@@ -299,8 +297,7 @@ EOT
{
title "seek tests" ;
- my $name = "test.gz" ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
my $first = "beginning" ;
my $last = "the end" ;
@@ -360,8 +357,7 @@ EOT
{
title 'fileno' ;
- my $name = "test.gz" ;
- my $lex = new LexFile $name ;
+ my $lex = new LexFile my $name ;
my $hello = <<EOM ;
hello world
diff --git a/ext/Compress/Zlib/t/22merge.t b/ext/Compress/Zlib/t/22merge.t
index ddb1659b1d..4389f3e369 100644
--- a/ext/Compress/Zlib/t/22merge.t
+++ b/ext/Compress/Zlib/t/22merge.t
@@ -78,8 +78,7 @@ foreach my $CompressClass ( map { "IO::Compress::$_" } qw( Gzip RawDeflate Defla
else
{ title "$CompressClass - Merge to filehandle that isn't writable" }
- my $out_file = 'abcde.out';
- my $lex = new LexFile($out_file) ;
+ my $lex = new LexFile my $out_file ;
# create empty file
open F, ">$out_file" ; print F "x"; close F;
@@ -129,8 +128,7 @@ foreach my $CompressClass ( map { "IO::Compress::$_" } qw( Gzip RawDeflate Defla
my $Error = getErrorRef($CompressClass);
- my $out_file = 'abcde.out';
- my $lex = new LexFile($out_file) ;
+ my $lex = new LexFile my $out_file ;
foreach my $to_file ( qw(buffer file handle ) )
{
@@ -172,8 +170,7 @@ foreach my $CompressClass ( map { "IO::Compress::$_" } qw( Gzip RawDeflate Defla
my $Error = getErrorRef($CompressClass);
- my $out_file = 'abcde.out';
- my $lex = new LexFile($out_file) ;
+ my $lex = new LexFile my $out_file ;
foreach my $to_file ( qw(buffer file handle ) )
{
@@ -219,8 +216,7 @@ foreach my $CompressClass ( map { "IO::Compress::$_" } qw( Gzip RawDeflate Defla
title "$CompressClass - Merge to file that doesn't exist";
- my $out_file = 'abcd.out';
- my $lex = new LexFile($out_file) ;
+ my $lex = new LexFile my $out_file ;
ok ! -e $out_file, " Destination file, '$out_file', does not exist";
@@ -240,8 +236,7 @@ foreach my $CompressClass ( map { "IO::Compress::$_" } qw( Gzip RawDeflate Defla
{
my $Error = getErrorRef($CompressClass);
- my $out_file = 'abcde.out';
- my $lex = new LexFile($out_file) ;
+ my $lex = new LexFile my $out_file ;
foreach my $to_file ( qw( buffer file handle ) )
{
@@ -322,8 +317,7 @@ foreach my $CompressClass ( map { "IO::Compress::$_" } qw( Gzip RawDeflate Defla
my $buffer ;
- my $out_file = 'abcde.out';
- my $lex = new LexFile($out_file) ;
+ my $lex = new LexFile my $out_file ;
foreach my $to_file (0, 1)
{
diff --git a/ext/Compress/Zlib/t/23misc.t b/ext/Compress/Zlib/t/23misc.t
index a2e4b5e556..a830b966bf 100644
--- a/ext/Compress/Zlib/t/23misc.t
+++ b/ext/Compress/Zlib/t/23misc.t
@@ -91,8 +91,7 @@ My::testParseParameters();
{
title "whatIsInput" ;
- my $out_file = "abc";
- my $lex = new LexFile($out_file) ;
+ my $lex = new LexFile my $out_file ;
open FH, ">$out_file" ;
is whatIsInput(*FH), 'handle', "Match filehandle" ;
close FH ;
@@ -111,8 +110,7 @@ My::testParseParameters();
{
title "whatIsOutput" ;
- my $out_file = "abc";
- my $lex = new LexFile($out_file) ;
+ my $lex = new LexFile my $out_file ;
open FH, ">$out_file" ;
is whatIsOutput(*FH), 'handle', "Match filehandle" ;
close FH ;