summaryrefslogtreecommitdiff
path: root/tests/date
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-05-15 07:08:38 +0000
committerJim Meyering <jim@meyering.net>2000-05-15 07:08:38 +0000
commita3ac01b48de742c9f8a53edf11a36374f5c3b3e1 (patch)
tree7f88543d9259394c0f1a8cb92e6a9f2f271c9422 /tests/date
parent00df9725bbb4e4a1001c2c7d3b86b105876d3ba3 (diff)
downloadcoreutils-a3ac01b48de742c9f8a53edf11a36374f5c3b3e1.tar.xz
(test_vector): Skip the %c test on SunOS4 systems.
Suggested by Paul Eggert. Reported by Volker Borchert.
Diffstat (limited to 'tests/date')
-rw-r--r--tests/date/Test.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/date/Test.pm b/tests/date/Test.pm
index 8e05a8cac..f13f77103 100644
--- a/tests/date/Test.pm
+++ b/tests/date/Test.pm
@@ -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]);
}