summaryrefslogtreecommitdiff
path: root/lib/File
diff options
context:
space:
mode:
authorThibault Duponchelle <thibault.duponchelle@gmail.com>2021-07-06 16:31:12 +0000
committerLeon Timmermans <fawaka@gmail.com>2021-07-13 20:51:34 +0200
commit7ffb9e762a2e972f46cd37962bd0aae40a4e7e3b (patch)
treed9e88317b35dba5271c4840c90605bc48a38b51b /lib/File
parentc9d678845a114f97048519e9c564b342b08ccfd2 (diff)
downloadperl-7ffb9e762a2e972f46cd37962bd0aae40a4e7e3b.tar.gz
Haiku BFS does not store atime and always return current time
Diffstat (limited to 'lib/File')
-rw-r--r--lib/File/stat.pm2
-rw-r--r--lib/File/stat.t20
2 files changed, 15 insertions, 7 deletions
diff --git a/lib/File/stat.pm b/lib/File/stat.pm
index d4993681da..57b8a39eb7 100644
--- a/lib/File/stat.pm
+++ b/lib/File/stat.pm
@@ -11,7 +11,7 @@ BEGIN { *warnif = \&warnings::warnif }
our(@EXPORT, @EXPORT_OK, %EXPORT_TAGS);
-our $VERSION = '1.10';
+our $VERSION = '1.11';
our @fields;
our ( $st_dev, $st_ino, $st_mode,
diff --git a/lib/File/stat.t b/lib/File/stat.t
index fc9bb12cef..07987a04c2 100644
--- a/lib/File/stat.t
+++ b/lib/File/stat.t
@@ -84,12 +84,20 @@ sub test_X_ops {
}
is($@, '', "Overload succeeds $desc");
- if ($^O eq "VMS" && $op =~ /[rwxRWX]/) {
- is($vwarn, 1, "warning about VMS ACLs $desc");
- } else {
- is($rv, eval "-$op \$file", "correct overload $desc")
- unless $access;
- is($vwarn, undef, "no warnings about VMS ACLs $desc");
+ SKIP : {
+ if ($^O eq "haiku" && $op =~ /A/) {
+ # atime is not stored on Haiku BFS
+ # and stat always returns local time instead
+ skip "testing -A $desc_tail on Haiku", 1;
+ }
+
+ if ($^O eq "VMS" && $op =~ /[rwxRWX]/) {
+ is($vwarn, 1, "warning about VMS ACLs $desc");
+ } else {
+ is($rv, eval "-$op \$file", "correct overload $desc")
+ unless $access;
+ is($vwarn, undef, "no warnings about VMS ACLs $desc");
+ }
}
# 111640 - File::stat bogus index check in overload