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

25 commits

Author SHA1 Message Date
Mark H Weaver
793e8a9317 Fix 'string-copy!' to work properly with overlapping src/dest.
* libguile/srfi-13.c (scm_string_copy_x): Fix to work properly with
  overlapping src/dest.

* test-suite/tests/srfi-13.test ("string-copy!"): Add tests.
2014-01-08 21:42:24 -05:00
Mark H Weaver
043850d984 Unoptimize 'read' to return freshly allocated empty strings
* libguile/read.c (scm_read_string): Return a freshly allocated string
  every time, even for empty strings.  The motivation is to allow source
  properties to be added to all strings.  Previously, the shared global
  'scm_nullstr' was returned for empty strings.  Note that empty strings
  still share a common global 'null_stringbuf'.

* test-suite/tests/srfi-13.test (substring/shared): Fix tests to reflect
  the fact that empty string literals are no longer guaranteed to be
  'eq?' to each other.
2012-02-08 16:27:32 -05:00
Andy Wingo
fc740bfce7 fix srfi-13 test argument orders
* test-suite/tests/srfi-13.test ("string-filter", "string-delete"): Fix
  argument order in tests.
2011-02-02 21:55:13 +01:00
Julian Graham
820f33aaed Improved support for Unicode title case in Guile's string and character APIs.
* doc/ref/api-data.texi (Characters): Documentation for `char-titlecase'.
* doc/ref/api-i18n.texi (Character Case Mapping): Documentation for
  `char-locale-titlecase' and `string-locale-titlecase'.

* libguile/chars.c, libguile/chars.h (scm_char_titlecase, scm_c_titlecase): New
  functions.

* libguile/i18n.c, libguile/i18n.h (chr_to_case, scm_char_locale_titlecase,
  str_to_case, scm_string_locale_titlecase): New functions.
* libguile/i18n.c (scm_char_locale_downcase, scm_char_locale_upcase,
  scm_string_locale_downcase, scm_string_locale_upcase): Refactor to share code
  via chr_to_case and str_to_case, as appropriate.
* module/ice-9/i18n.scm (char-locale-title-case, string-locale-titlecase): New
  functions.

* libguile/srfi-13.c (string_titlecase_x): Use uc_totitle instead of uc_toupper.

* test-suite/tests/chars.test: Tests for `char-titlecase'.
* test-suite/tests/i18n.test: Tests for `char-locale-titlecase' and
  `string-locale-titlecase'.
* test-suite/tests/srfi-13.test: Tests for `string-titlecase'.
2009-12-22 00:19:56 -05:00
Michael Gran
fee95176df More tests for strings
* test-suite/tests/vectors.test: test make-vector and interactions between
  strings and vectors

* test-suite/tests/strings.test: test string-null?, string? and backslash
  escapes

* test-suite/tests/srfi-13.test: test null input strings in string-any and
  string-every
2009-09-20 20:59:44 -07:00
Michael Gran
1441e6dbd7 Some srfi-13 test with wide strings
* test-suite/tests/srfi-13.test: more tests
2009-08-19 23:21:18 -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
Kevin Ryde
6e7d5622ee merge from 1.8 branch 2006-04-16 23:37:40 +00:00
Kevin Ryde
8a8ca420b1 (string-append/shared): New tests. 2005-11-30 00:35:45 +00:00
Kevin Ryde
685788d023 (string-every, string-tabulate, string-trim,
string-trim-right, string-trim-both, string-index, string-index-right,
string-skip, string-skip-right, string-count, string-filter,
string-delete, string-map, string-map!, string-for-each,
string-for-each-index): Further tests, mainly to exercise new
trampolines for proc calls.
2005-08-06 01:48:37 +00:00
Kevin Ryde
f29749529b (string-filter): A few more tests. 2005-06-10 22:37:01 +00:00
Marius Vollmer
92205699d0 The FSF has a new address. 2005-05-23 19:57:22 +00:00
Kevin Ryde
0381cf345d (string-concatenate, string-concatenate/shared): New tests. 2005-04-10 22:19:26 +00:00
Kevin Ryde
59216e48da (string-index): Exercise 8-bit char in string. 2005-03-25 20:58:22 +00:00
Marius Vollmer
d7e4c2da23 * tests/ports.test ("string ports"): Copy string literal so that
it can be modified.
* tests/srfi-13.test ("string-copy!"): Likewise.
* tests/strings.test ("substring/shared"): Likewise.
2004-09-22 14:32:47 +00:00
Marius Vollmer
685777ca18 (module-peek): Removed, this kluge is no longer necessary. 2004-08-27 12:44:14 +00:00
Kevin Ryde
967c0904a0 (string-any, string-every): Exercise char and charset predicate cases. 2004-08-14 00:43:56 +00:00
Kevin Ryde
4c6563e1ed (string-every): Check empty string case. 2004-08-02 00:30:21 +00:00
Marius Vollmer
d26d290311 (string-tokenize): Updated for fixed semantics. 2002-04-26 18:35:34 +00:00
Thien-Thi Nguyen
e5c5ac9240 (string-for-each, string-for-each-index): Add tests. 2001-08-24 22:06:05 +00:00
Mikael Djurfeldt
80fdeb4e5a * tests/srfi-13.test (string-map): Swapped order of string and
proc args to conform with the srfi.  (Thanks to Alex Shinn.)

* srfi-13.c (string-map): Swapped order of string and proc args to
conform with the srfi.  (Thanks to Alex Shinn.)
2001-08-22 12:00:06 +00:00
Martin Grabmüller
5f5850b38c * tests/srfi-13.test: More tests. 2001-05-16 18:04:20 +00:00
Martin Grabmüller
f764e6d10d * tests/srfi-10.test: New file.
* tests/srfi-9.test: New file.

	* tests/srfi-13.test: Added some more tests.
2001-05-10 13:52:27 +00:00
Martin Grabmüller
7cfbc4f7b0 * tests/srfi-13.test: Added module access kludge, and uncommented
some tests depending on this.
2001-05-08 06:04:15 +00:00
Martin Grabmüller
df937d20e0 * tests/srfi-13.test: New file testing the SRFI string library. 2001-05-07 21:52:25 +00:00