summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-05-05 18:22:56 +0200
committerLudovic Courtès <ludo@gnu.org>2023-05-05 23:47:48 +0200
commit8749f31485888c587c6f88a0a7bdd48cc9e8c9b8 (patch)
treeb46204127e2c5bc02e94740dd79f842093af7ba1 /tests
parent94d0efffb39878440bcac564a0ce18c7af3de64f (diff)
downloadguix-8749f31485888c587c6f88a0a7bdd48cc9e8c9b8.tar.gz
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.
Diffstat (limited to 'tests')
-rw-r--r--tests/read-print.scm5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/read-print.scm b/tests/read-print.scm
index c2b236b172..9e1d8038f1 100644
--- a/tests/read-print.scm
+++ b/tests/read-print.scm
@@ -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 "\