develooper Front page | perl.perl5.porters | Postings from July 2003

Re: [PATCH] test clean-up for VMS

Thread Previous | Thread Next
From:
Michael G Schwern
Date:
July 19, 2003 23:31
Subject:
Re: [PATCH] test clean-up for VMS
Message ID:
20030720063127.GC14340@windhund.schwern.org
On Sat, Jul 19, 2003 at 11:11:41PM -0500, Craig A. Berry wrote:
> In most cases the mess is harmless, but lib/ExtUtils/t/Command.t #2
> counts the number of files returned in a glob operation, and it fails if
> it find multiple versions of the first file in the t/ directory.

Note to self: have Command.t create a temp directory and read from that.


> --- lib/FileCache/t/01open.t;-0	Sun Jun 22 15:56:24 2003
> +++ lib/FileCache/t/01open.t	Sat Jul 19 18:37:48 2003
> @@ -10,7 +10,7 @@
>      END;
>  }
>  END{
> -  unlink @files;
> +  for $f (@files) { close $f; 1 while unlink $f; }
>  }

Any reason this couldn't be written:  1 while unlink @files; ?
Does it make any sense to close() a filename?


> --- lib/FileCache/t/02maxopen.t;-0	Sun Jun 15 14:14:24 2003
> +++ lib/FileCache/t/02maxopen.t	Sat Jul 19 18:40:39 2003
> @@ -12,7 +12,7 @@
>      plan tests=>5;
>  }
>  END{
> -  unlink @files;
> +  for $f (@files) { 1 while unlink $f; }
>  }

Ditto, 1 while unlink @files?

> --- ext/PerlIO/t/encoding.t;-0	Sat May 24 04:05:12 2003
> +++ ext/PerlIO/t/encoding.t	Fri Jul 18 23:04:12 2003
> @@ -151,5 +151,5 @@
>  print "ok 14\n";
>  
>  END {
> -    unlink($grk, $utf, $fail1, $fail2, $russki, $threebyte);
> +    for $f ($grk, $utf, $fail1, $fail2, $russki, $threebyte) { 1 while unlink $f; }
>  }

Ditto.


-- 
It's Flypaper Licking time!

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About