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

strptime test shouldn't presume that initial whitespace is ignored

As far as I can tell, ignoring initial whitespace is not required by POSIX.

* test-suite/tests/time.test (strptime tests):
This commit is contained in:
Mike Gran 2021-01-23 12:35:01 -08:00
parent d6afb41192
commit 480d86df68

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, 2008, 2019 Free Software Foundation, Inc.
;;;; Copyright (C) 1999,2004,2006,2007,2008,2019,2021 Free Software Foundation, Inc.
;;;;
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
@ -275,7 +275,7 @@
(pass-if-equal "strftime fr_FR.utf8"
'(1 2 1999)
(with-locale "fr_FR.utf8"
(let ((tm (car (strptime "%e %B %Y" " 1 février 1999"))))
(let ((tm (car (strptime "%e %B %Y" "1 février 1999"))))
(list (tm:mday tm)
(+ 1 (tm:mon tm))
(+ 1900 (tm:year tm))))))
@ -283,7 +283,7 @@
(pass-if-equal "strftime fr_FR.iso88591" ;<https://bugs.gnu.org/35920>
'(1 2 1999)
(with-locale "fr_FR.iso88591"
(let ((tm (car (strptime "%e %B %Y" " 1 février 1999"))))
(let ((tm (car (strptime "%e %B %Y" "1 février 1999"))))
(list (tm:mday tm)
(+ 1 (tm:mon tm))
(+ 1900 (tm:year tm))))))