From a3ac01b48de742c9f8a53edf11a36374f5c3b3e1 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Mon, 15 May 2000 07:08:38 +0000 Subject: (test_vector): Skip the %c test on SunOS4 systems. Suggested by Paul Eggert. Reported by Volker Borchert. --- tests/date/Test.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'tests') 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]); } -- cgit v1.2.3-70-g09d2