summaryrefslogtreecommitdiff
path: root/test-suite/tests
diff options
context:
space:
mode:
authorMaxime Devos <maximedevos@telenet.be>2021-07-18 19:59:32 +0200
committerDaniel Llorens <lloda@sarc.name>2021-08-02 12:15:59 +0200
commitc78c130b1ddef6d6c290533f74ce1fbd51a4b19d (patch)
tree2dd557e2dd300aed81266c717fad15d5b65faacc /test-suite/tests
parentd79a226359d28f4a1dc5df136e5544d699903a96 (diff)
downloadguile-c78c130b1ddef6d6c290533f74ce1fbd51a4b19d.tar.gz
ice-9/read: Parse #{}}# properly.
This is a regression since Guile 3.0.2 and breaks compilation of a Guile library. * module/ice-9/read.scm (%read)[read-parenthesized]: When SAW-BRACE? is #t but CH isn't #\#, don't eat CH. * test-suite/tests/reader.test ("#{}#): Add four test cases.
Diffstat (limited to 'test-suite/tests')
-rw-r--r--test-suite/tests/reader.test5
1 files changed, 5 insertions, 0 deletions
diff --git a/test-suite/tests/reader.test b/test-suite/tests/reader.test
index 1481a0a5d..ad7c6d575 100644
--- a/test-suite/tests/reader.test
+++ b/test-suite/tests/reader.test
@@ -536,6 +536,11 @@
(with-test-prefix "#{}#"
(pass-if (equal? (read-string "#{}#") '#{}#))
+ ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=49623>
+ (pass-if (equal? (read-string "#{}}#") (string->symbol "}")))
+ (pass-if (equal? (read-string "#{}}}#") (string->symbol "}}")))
+ (pass-if (equal? (read-string "#{{}}#") (string->symbol "{}")))
+ (pass-if (equal? (read-string "#{{}b}#") (string->symbol "{}b")))
(pass-if (not (equal? (read-string "(a #{.}# b)") '(a . b))))
(pass-if (equal? (read-string "#{a}#") 'a))
(pass-if (equal? (read-string "#{a b}#") '#{a b}#))