1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-29 06:20:30 +02:00

Better diagnose broken (strftime "%z" ...)' in time.test' (bug #24130).

* test-suite/tests/time.test ("strftime")["C99 %z
  format"](have-strftime-%z): Better diagnose broken "%z" on Tru64 5.1b
  and AIX.  Closes bug #24130.

* NEWS: Update.
This commit is contained in:
Ludovic Courtès 2009-05-12 00:01:30 +02:00
parent 5d8f339fd8
commit 1011599792
2 changed files with 7 additions and 5 deletions

1
NEWS
View file

@ -16,6 +16,7 @@ Changes in 1.8.7 (since 1.8.6)
** Fix build when compiled with -Wundef -Werror
** More build fixes for `alphaev56-dec-osf5.1b' (Tru64)
** With GCC, always compile with `-mieee' on `alpha*' and `sh*'
** Better diagnose broken `(strftime "%z" ...)' in `time.test' (bug #24130)
** Allow @ macro to work with (ice-9 syncase)

View file

@ -1,7 +1,7 @@
;;;; time.test --- test suite for Guile's time functions -*- scheme -*-
;;;; Jim Blandy <jimb@red-bean.com> --- June 1999, 2004
;;;;
;;;; Copyright (C) 1999, 2004, 2006, 2007 Free Software Foundation, Inc.
;;;; Copyright (C) 1999, 2004, 2006, 2007, 2009 Free Software Foundation, Inc.
;;;;
;;;; This program is free software; you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
@ -222,12 +222,13 @@
;; C99 spec is empty string if no zone determinable
;;
;; on pre-C99 systems not sure what to expect if %z unsupported, probably
;; "%z" unchanged in C99 if timezone
;; On pre-C99 systems not sure what to expect if %z unsupported, probably
;; "%z" unchanged in C99 if timezone. On AIX and Tru64 5.1b, it returns
;; a string such as "GMT" or "EST", instead of "+0000" or "-0500". See
;; https://savannah.gnu.org/bugs/index.php?24130 for details.
;;
(define have-strftime-%z
(not (member (strftime "%z" (gmtime 0))
'("" "%z"))))
(equal? (strftime "%z" (gmtime 0)) "+0000"))
;; %z here is quite possibly affected by the same tm:gmtoff vs current
;; zone as %Z above is, so in the following tests we make them the same.