mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-05-28 03:51:53 +02:00
read-print: Correctly read "(. x)".
* guix/read-print.scm (read-with-comments): Check whether REST is a pair
before calling 'set-cdr!'.
* tests/read-print.scm ("read-with-comments: half dot notation"): New test.
This commit is contained in:
@@ -58,6 +58,11 @@ expressions."
|
||||
(call-with-input-string "(a . b)"
|
||||
read-with-comments))
|
||||
|
||||
(test-equal "read-with-comments: half dot notation"
|
||||
'(lambda x x)
|
||||
(call-with-input-string "(lambda (. x) x)"
|
||||
read-with-comments))
|
||||
|
||||
(test-equal "read-with-comments: list with blank line"
|
||||
`(list with ,(vertical-space 1) blank line)
|
||||
(call-with-input-string "\
|
||||
|
||||
Reference in New Issue
Block a user