]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(test_vector): Skip the %c test on SunOS4 systems.
authorJim Meyering <jim@meyering.net>
Mon, 15 May 2000 07:08:38 +0000 (07:08 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 15 May 2000 07:08:38 +0000 (07:08 +0000)
Suggested by Paul Eggert.  Reported by Volker Borchert.

tests/date/Test.pm

index 8e05a8cacf67b0b6fcc73a05636cd8cb05162cb7..f13f77103c20c7b4219657e5e68f61f54fcd5b26 100644 (file)
@@ -3,6 +3,8 @@ package Test;
 require 5.002;
 use strict;
 
+use Config;
+
 # For each test...
 # Export LANG=C so that the locale-dependent strings match.
 # Export TZ=UTC0 so that zone-dependent strings match.
@@ -124,11 +126,21 @@ sub test_vector
      # FIXME: add a lot more...
      );
 
+  my $sunos4 = "$Config::Config{osname}$Config::Config{osvers}" =~ /sunos4/;
+
   my @tv;
   my $t;
   foreach $t (@tvec)
     {
       my ($test_name, $flags, $in, $exp, $ret) = @$t;
+
+      # Skip the test of %c on SunOS4 systems.  Such systems would fail this
+      # test because their underlying strftime doesn't handle the %c format
+      # properly.  GNU strftime must rely on the underlying host library
+      # function to get locale-dependent behavior, as strftime is the only
+      # portable interface to that behavior.
+      next if $sunos4 && $test_name eq '2';
+
       # Append a newline to end of each expected string.
       push (@tv, [$test_name, $flags, $in, "$exp\n", $ret]);
     }