File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ use strict;
9
9
10
10
use Config;
11
11
use POSIX;
12
- use Test::More tests => 26 ;
12
+ use Test::More tests => 27 ;
13
13
14
14
# For the first go to UTC to avoid DST issues around the world when testing. SUS3 says that
15
15
# null should get you UTC, but some environments want the explicit names.
@@ -205,3 +205,18 @@ SKIP: {
205
205
is(mktime(CORE::localtime ($time )), $time , " mktime()" );
206
206
is(mktime(POSIX::localtime ($time )), $time , " mktime()" );
207
207
}
208
+
209
+ SKIP: { # XXX: Improve this test!
210
+ skip " System 'date' command not tested on all OSes yet" , 1
211
+ unless ($^O eq ' linux' or $^O eq ' freebsd' or $^O eq ' openbsd' );
212
+ my $xdate = ` date '+%s '` ;
213
+ chomp $xdate ;
214
+ my $posix_strftime = POSIX::strftime(' %s' , localtime );
215
+ my $perl_time = time ;
216
+ ok(
217
+ ($posix_strftime == $xdate ) &&
218
+ ($posix_strftime == $perl_time ),
219
+ ' GH #22351; pr: GH #22369'
220
+ );
221
+ }
222
+
You can’t perform that action at this time.
0 commit comments