diff options
author | Mark H Weaver <mhw@netris.org> | 2014-10-01 20:45:41 -0400 |
---|---|---|
committer | Mark H Weaver <mhw@netris.org> | 2014-10-01 21:00:23 -0400 |
commit | 5af307de43e4b65eec7f235b48a8908f2a00f134 (patch) | |
tree | d54922dad8c9f8c8933110c96b1dc029bf29b577 /test-suite | |
parent | b1451ad859183ae48c624d19ec144306bd2d3e3a (diff) | |
download | guile-5af307de43e4b65eec7f235b48a8908f2a00f134.tar.gz |
read: Accept "\(" in string literals.
Suggested by David Kastrup <dak@gnu.org> in <http://bugs.gnu.org/13644>.
* libguile/read.c (scm_read_string_like_syntax): Accept "\(" as
equivalent to "(".
* doc/ref/api-data.texi (String Syntax): Document it.
* test-suite/tests/reader.test ("reading"): Add test.
Diffstat (limited to 'test-suite')
-rw-r--r-- | test-suite/tests/reader.test | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test-suite/tests/reader.test b/test-suite/tests/reader.test index 18c0293b8..9055e3b67 100644 --- a/test-suite/tests/reader.test +++ b/test-suite/tests/reader.test @@ -1,7 +1,8 @@ ;;;; reader.test --- Reader test. -*- coding: iso-8859-1; mode: scheme -*- ;;;; -;;;; Copyright (C) 1999, 2001, 2002, 2003, 2007, 2008, 2009, 2010, 2011, -;;;; 2014 Free Software Foundation, Inc. +;;;; Copyright (C) 1999, 2001-2003, 2007-2011, 2014 +;;;; Free Software Foundation, Inc. +;;;; ;;;; Jim Blandy <jimb@red-bean.com> ;;;; ;;;; This library is free software; you can redistribute it and/or @@ -78,6 +79,10 @@ "a|b" (read-string "\"a\\|b\"")) + (pass-if-equal "'(' in string literals" + "a(b" + (read-string "\"a\\(b\"")) + (pass-if-equal "#\\escape" '(a #\esc b) (read-string "(a #\\escape b)")) |