is($WARN, '', "ignore warning on embedded nul with no warnings syscalls");
}
- use Errno 'ENOENT';
- # check handling of multiple arguments, which the original patch
- # mis-handled
- $! = 0;
- is (unlink($fn, $fn), 0, "check multiple arguments to unlink");
- is($!+0, ENOENT, "check errno");
- $! = 0;
- is (chmod(0644, $fn, $fn), 0, "check multiple arguments to chmod");
- is($!+0, ENOENT, "check errno");
- $! = 0;
- is (utime(time, time, $fn, $fn), 0, "check multiple arguments to utime");
- is($!+0, ENOENT, "check errno");
SKIP: {
- skip "no chown", 2 unless $Config{d_chown};
+ if (is_miniperl && !eval 'require Errno') {
+ skip "Errno not built yet", 8;
+ }
+ require Errno;
+ import Errno 'ENOENT';
+ # check handling of multiple arguments, which the original patch
+ # mis-handled
$! = 0;
- is(chown(-1, -1, $fn, $fn), 0, "check multiple arguments to chown");
- is($!+0, ENOENT, "check errno");
+ is (unlink($fn, $fn), 0, "check multiple arguments to unlink");
+ is($!+0, &ENOENT, "check errno");
+ $! = 0;
+ is (chmod(0644, $fn, $fn), 0, "check multiple arguments to chmod");
+ is($!+0, &ENOENT, "check errno");
+ $! = 0;
+ is (utime(time, time, $fn, $fn), 0, "check multiple arguments to utime");
+ is($!+0, &ENOENT, "check errno");
+ SKIP: {
+ skip "no chown", 2 unless $Config{d_chown};
+ $! = 0;
+ is(chown(-1, -1, $fn, $fn), 0, "check multiple arguments to chown");
+ is($!+0, &ENOENT, "check errno");
+ }
}
is (unlink($fn), 0, "unlink fails with \\0 in name");