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

15 commits

Author SHA1 Message Date
Mike Gran
480d86df68 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):
2021-01-23 12:35:01 -08:00
Ludovic Courtès
ab2fd70ef1 'strftime' and 'strptime' honor the locale encoding.
Fixes <https://bugs.gnu.org/35920>.
Reported by Christopher Lam <christopher.lck@gmail.com>.

* libguile/stime.c (scm_strftime): Use 'scm_to_locale_stringn' instead
of 'scm_to_utf8_stringn'.
(scm_strptime): Likewise, and use 'scm_string_length' instead of
'u8_strnlen'.
* test-suite/tests/time.test ("strftime")["strftime passes wide
characters"]: Wrap body in 'with-locale'.
["strftime fr_FR.utf8", "strftime fr_FR.iso88591"]: New tests.
("strptime")["strftime fr_FR.utf8", "strftime fr_FR.iso88591"]: New
tests.
2019-06-30 21:31:36 +02:00
Mark H Weaver
75f3ba7759 time.test: Use 'pass-if-equal' in more tests.
* test-suite/tests/time.test ("strftime"): Change some uses of 'pass-if'
to instead use 'pass-if-equal'.
2019-06-18 02:05:20 -04:00
Michael Gran
587a33556f Modify socket and time functions for wide strings
* libguile/socket.c (scm_recv): receive the message without holding the
  stringbuf writing lock
  (scm_send): try to narrow a string before using it

* libguile/stime.c (strftime): convert string to UTF-8 so that it can
  be safely passed to strftime
  (strptime): convert input string to UTF-8 so that it can be safely
  passed through strptime

* libguile/strings.c (narrow_stringbuf): new function
  (scm_i_try_narrow_string): new function

* libguile/strings.h: new declaration for scm_i_try_narrow_string
2009-08-23 09:29:45 -07:00
Neil Jerram
53befeb700 Change Guile license to LGPLv3+
(Not quite finished, the following will be done tomorrow.
   module/srfi/*.scm
   module/rnrs/*.scm
   module/scripts/*.scm
   testsuite/*.scm
   guile-readline/*
)
2009-06-17 00:22:09 +01:00
Ludovic Courtès
69f23174d3 Use Gnulib's `strftime' to address bug #24130.
* libguile/stime.c (scm_strftime): Use `nstrftime ()' from Gnulib.
  This provides the same semantics on all platforms, thereby fixing
  bug #24130.

* doc/ref/posix.texi (Time): Remove note about non-portable `%Z'
  behavior.  Describe the new, portable behavior.

* test-suite/tests/time.test ("strftime")["strftime %Z doesn't return
  garbage"]: Reinstate.
  ["C99 %z format"](have-strftime-%z): Remove.
  ("GMT", "EST+5"): Don't use `have-strftime-%z'.
2008-09-02 21:58:58 +02:00
Kevin Ryde
004be623c4 merge from 1.8 branch 2007-03-07 23:00:22 +00:00
Kevin Ryde
8ab3d8a068 merge from 1.8 branch 2006-10-09 23:40:48 +00:00
Kevin Ryde
6e7d5622ee merge from 1.8 branch 2006-04-16 23:37:40 +00:00
Marius Vollmer
a64d058951 Replaced 'futures' with threads. 2006-01-29 19:44:45 +00:00
Kevin Ryde
9f4e29f66b (strftime %Z): Disable this test, its assumptions
about %Z are not valid on NetBSD.
2005-10-23 22:40:12 +00:00
Marius Vollmer
92205699d0 The FSF has a new address. 2005-05-23 19:57:22 +00:00
Kevin Ryde
c59e0b9fb1 (gmtime, strptime): New tests, but unresolved.
(internal-time-units-per-second): New test.
2004-09-07 00:17:49 +00:00
Kevin Ryde
feb3640d87 (strftime): Force tm:isdst to 0 for the test, for
the benefit of HP-UX.  Reported by Andreas Vögele.
Use set-tm:zone rather than a hard coded vector offset.
2004-05-02 23:08:58 +00:00
Jim Blandy
9061286382 * tests/time.test: New test file. 1999-06-15 14:09:53 +00:00