Subject: | On 10_dir.t |
Hi, Goro,
Oddly enough, at least in my circumstances: that is, ActivePerl Build 817 and MSWIN32,
SETERRNO(EPERM, RMS_PRV) in PerlIODir_open couldn't spread, and because of it, $!{EPERM}
would be equal to 0.
Take a look at the fallowing.
--- 10_dir.t.org Sun Jun 1 14:52:44 2008
+++ 10_dir.t Tue Jun 3 03:52:07 2008
@@ -71,11 +71,19 @@
$! = 0;
ok !open($dir, '>:dir', '.'), 'open:dir for writing';
ok $!{EPERM}, '... permission denied';
+diag $!{EPERM};
+diag $!;
ok !open($dir, '+<:dir', '.'), 'open:dir for update';
ok $!{EPERM}, '... permission denied';
+diag $!{EPERM};
+diag $!;
ok !open($dir, '<:dir', File::Spec->join($Bin, 'util', '.lock')), 'open:dir for a file';
ok $!{ENOTDIR}, '... not a directory';
+diag $!{ENOTDIR};
+diag $!;
ok !open($dir, '<:dir', File::Spec->join($Bin, 'util', '@@@')), 'open:dir no such directory';
ok $!{ENOENT}, '... no such file or directory';
+diag $!{ENOENT};
+diag $!;
This result was as follows:
t/10_dir..............1/33
# Failed test '... permission denied'
# at t/10_dir.t line 73.
# 0
# Bad file descriptor
# Failed test '... permission denied'
# at t/10_dir.t line 77.
# 0
# Bad file descriptor
# Failed test '... not a directory'
# at t/10_dir.t line 82.
# 0
# Bad file descriptor
# 2
# No such file or directory
# Looks like you failed 3 tests of 33.
t/10_dir.............. Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/33 subtests
Regards,
Taro Nishino