In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/91514b78cb264f1b259dc267a0aa11f7cc9d8b4a?hp=ba5e661aead245e882b11d5a1c89fffaedbc29ec>

- Log -----------------------------------------------------------------
commit 91514b78cb264f1b259dc267a0aa11f7cc9d8b4a
Author: Ricardo Signes <[email protected]>
Date:   Wed Jan 16 18:40:44 2013 -0500

    further refinement to EISDIR tests from `perl dir`
    
    1. actually use the EISDIR string, rather than getting it and
       not using it; this was a refactoring screw-up
    
    2. don't hardcode the Win32 EACCES error, either, use the same
       "$!" mechanism
-----------------------------------------------------------------------

Summary of changes:
 t/run/switches.t |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/t/run/switches.t b/t/run/switches.t
index ea94571..1324f5a 100644
--- a/t/run/switches.t
+++ b/t/run/switches.t
@@ -14,7 +14,7 @@ BEGIN { require "./test.pl"; }
 plan(tests => 115);
 
 use Config;
-use Errno qw(EISDIR);
+use Errno qw(EACCES EISDIR);
 
 # due to a bug in VMS's piping which makes it impossible for runperl()
 # to emulate echo -n (ie. stdin always winds up with a newline), these 
@@ -117,8 +117,7 @@ SWTEST
 
     # Win32 won't let us open the directory, so we never get to die with
     # EISDIR, which happens after open.
-    my $eisdir = do { local $! = EISDIR; "$!" };
-    my $error = $^O eq 'MSWin32' ? 'Permission denied' : 'Is a directory';
+    my $error  = do { local $! = $^O eq 'MSWin32' ? EACCES : EISDIR; "$!" };
     like(
         runperl( switches => [ '-c' ], args  => [ $tempdir ], stderr => 1),
         qr/Can't open perl script.*$tempdir.*\Q$error/s,

--
Perl5 Master Repository

Reply via email to