Skip to content

Commit

Permalink
macOS: t/Tools_File.t fails.
Browse files Browse the repository at this point in the history
Note: Some plathomes (e.g. macOS with Perl < 5.32) miss or simply don't
implement futimes system call so that calling utime() on filehandle may
crash.
  • Loading branch information
ikedas committed Dec 6, 2021
1 parent b17e3bb commit 7fa7c10
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions t/Tools_File.t
Expand Up @@ -136,9 +136,12 @@ ok(-d "$dir/foo/bar", 'mkdir_all second element');
is(get_perms("$dir/foo"), "0777", "first element, expected mode");
is(get_perms("$dir/foo/bar"), "0777", "second element, expected mode");

utime 1234567890, 123456789, $file;
# Note: Some plathomes (e.g. macOS with Perl < 5.32) miss or simply don't
# implement futimes system call so that calling utime() on filehandle may
# crash.
utime 1234567890, 123456789, $file->filename;
is(Sympa::Tools::File::get_mtime($file), 123456789);
utime 123456789, 1234567890, $file;
utime 123456789, 1234567890, $file->filename;
is(Sympa::Tools::File::get_mtime($file), 1234567890);
ok(Sympa::Tools::File::get_mtime("$dir/no-such-file") < -32768);
chmod 0333, $file;
Expand Down

0 comments on commit 7fa7c10

Please sign in to comment.