summaryrefslogtreecommitdiff
path: root/test-suite/tests/srfi-19.test
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2008-09-10 22:33:40 +0200
committerLudovic Courtès <ludo@gnu.org>2008-09-10 22:33:40 +0200
commit4a4849dbe0ae1b731b408167f90222e05d1ca2bd (patch)
treecaa909b99ffb221e43408a3d19ad3e8209e3a96b /test-suite/tests/srfi-19.test
parent3ec17f28b8f96fa43218db83656c0d85b4f69d7c (diff)
parent032913739218c756f673bfb9c8f66ef9f8f02330 (diff)
downloadguile-4a4849dbe0ae1b731b408167f90222e05d1ca2bd.tar.gz
Merge commit '032913739218c756f673bfb9c8f66ef9f8f02330' into boehm-demers-weiser-gc
Conflicts: libguile/gc.c libguile/srcprop.c libguile/srcprop.h
Diffstat (limited to 'test-suite/tests/srfi-19.test')
-rw-r--r--test-suite/tests/srfi-19.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/test-suite/tests/srfi-19.test b/test-suite/tests/srfi-19.test
index 126198afa..33e667cfc 100644
--- a/test-suite/tests/srfi-19.test
+++ b/test-suite/tests/srfi-19.test
@@ -27,6 +27,9 @@
:use-module (srfi srfi-19)
:use-module (ice-9 format))
+;; Make sure we use the default locale.
+(setlocale LC_ALL "C")
+
(define (with-tz* tz thunk)
"Temporarily set the TZ environment variable to the passed string
value and call THUNK."
@@ -142,6 +145,19 @@ incomplete numerical tower implementation.)"
(string->date "2001-06-01@08:00" "~Y-~m-~d@~H:~M")))
(date->time-utc
(make-date 0 0 0 12 1 6 2001 0))))
+ (pass-if "string->date understands days and months"
+ (time=? (let ((d (string->date "Saturday, December 9, 2006"
+ "~A, ~B ~d, ~Y")))
+ (date->time-utc (make-date (date-nanosecond d)
+ (date-second d)
+ (date-minute d)
+ (date-hour d)
+ (date-day d)
+ (date-month d)
+ (date-year d)
+ 0)))
+ (date->time-utc
+ (make-date 0 0 0 0 9 12 2006 0))))
;; check time comparison procedures
(let* ((time1 (make-time time-monotonic 0 0))
(time2 (make-time time-monotonic 0 0))