From: Paul Marquess Date: Sun, 8 Jan 2006 23:47:33 +0000 (+0000) Subject: RE: Failing tests on VMS blead@26652 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9f2e35140733c7b8f4ab179f11bf740ca3d2130e;p=p5sagit%2Fp5-mst-13.2.git RE: Failing tests on VMS blead@26652 From: "Paul Marquess" Message-ID: <00cd01c614ad$e815d340$6401a8c0@myopwv.com> p4raw-id: //depot/perl@26751 --- diff --git a/ext/Compress/Zlib/t/03zlib-v1.t b/ext/Compress/Zlib/t/03zlib-v1.t index 92a7f16..0930520 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 b41184b..fb9e4bd 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 = <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 81c75a1..782fc4a 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 68dd0d1..eaba1f4 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 9eda40d..4e32d64 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 e7b52a0..fc74060 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 67b50d8..f12b0d5 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 afb65d3..d0acbd8 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 cb2233b..04116e2 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 5d8342b..141b701 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 2cb6dec..0b65ef6 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 d5ad462..d382ba0 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 2b2d576..0d4eb75 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 = <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 3a416fa..eb642b6 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 = <$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 a2e4b5e..a830b96 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 ; diff --git a/t/lib/ZlibTestUtils.pm b/t/lib/ZlibTestUtils.pm index f134110..7d044be 100644 --- a/t/lib/ZlibTestUtils.pm +++ b/t/lib/ZlibTestUtils.pm @@ -36,7 +36,7 @@ sub like_eval unless defined $_; } chmod 0777, @_; - unlink @_ ; + for (@_) { 1 while unlink $_ } ; bless [ @_ ], $self ; } @@ -44,7 +44,7 @@ sub like_eval { my $self = shift ; chmod 0777, @{ $self } ; - unlink @{ $self } ; + for (@$self) { 1 while unlink $_ } ; } }