This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Until proven otherwise I don't think any of the strftime
authorJarkko Hietaniemi <jhi@iki.fi>
Thu, 12 Dec 2002 18:06:57 +0000 (18:06 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Thu, 12 Dec 2002 18:06:57 +0000 (18:06 +0000)
formats %c, %z, and %Z can be tested portably.

p4raw-id: //depot/maint-5.8/perl@18295

ext/POSIX/t/posix.t

index 9b0a751..6ce418c 100644 (file)
@@ -11,8 +11,7 @@ BEGIN {
 }
 
 require "./test.pl";
-plan(tests => 66);
-
+plan(tests => 61);
 
 use POSIX qw(fcntl_h signal_h limits_h _exit getcwd open read strftime write
             errno);
@@ -183,26 +182,6 @@ try_strftime("Wed Mar 01 00:00:00 2000 061", 0,0,0, 1,2,100);
 try_strftime("Fri Mar 31 00:00:00 2000 091", 0,0,0, 31,2,100);
 &POSIX::setlocale(&POSIX::LC_TIME, $lc) if $Config{d_setlocale};
 
-SKIP: {
-    # XXX wait for smokers to see which OSs else to skip
-    skip("No mktime and/or tm_gmtoff", 5)
-       if !$Config{d_mktime} || !$Config{d_tm_tm_gmtoff} || !$Config{d_tm_tm_zone};
-    local $ENV{TZ} = "Europe/Berlin";
-
-    # May fail for ancient FreeBSD versions.
-    # %z is not included in POSIX, but valid on Linux and FreeBSD.
-    foreach $def ([1000,'Sun Sep  9 03:46:40 2001 +0200 CEST'],
-                 [900, 'Thu Jul  9 18:00:00 1998 +0200 CEST'],
-                 [800, 'Tue May  9 08:13:20 1995 +0200 CEST'],
-                 [700, 'Sat Mar  7 21:26:40 1992 +0100 CET'],
-                 [600, 'Thu Jan  5 11:40:00 1989 +0100 CET'],
-                ) {
-       my($t, $expected) = @$def;
-        my @tm = localtime($t*1000000);
-       is(strftime("%c %z %Z",@tm), $expected, "validating zone setting: $expected");
-    }
-}
-
 {
     for my $test (0, 1) {
        $! = 0;