summary refs log tree commit diff
path: root/tests/read-print.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2023-01-09 17:04:55 +0100
committerLudovic Courtès <ludo@gnu.org>2023-01-09 17:40:54 +0100
commit6c343d0d0f6b8560e9eb594ce1d4f984753a35fb (patch)
tree380e8d3e757ddd28c8e0213ff94a68931227ffb4 /tests/read-print.scm
parent407175a1d0e29f45639e7f28a531b3981cd20085 (diff)
downloadguix-6c343d0d0f6b8560e9eb594ce1d4f984753a35fb.tar.gz
read-print: Do not use extended notation when printing '1+', '1-', etc.
* guix/read-print.scm (%special-non-extended-symbols): New variable.
(symbol->display-string): New procedure.
(pretty-print-with-comments): Use it in lieu of 'string->symbol'.
* tests/read-print.scm: Add test.
Diffstat (limited to 'tests/read-print.scm')
-rw-r--r--tests/read-print.scm7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/read-print.scm b/tests/read-print.scm
index ea52a52145..79a4101be6 100644
--- a/tests/read-print.scm
+++ b/tests/read-print.scm
@@ -1,5 +1,5 @@
 ;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2021-2022 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2021-2023 Ludovic Courtès <ludo@gnu.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -143,6 +143,11 @@ expressions."
                    #:max-width 11)
 
 (test-pretty-print "\
+(begin
+  1+ 1- 123/ 456*
+  (1+ 41))")
+
+(test-pretty-print "\
 (lambda (x y)
   ;; This is a procedure.
   (let ((z (+ x y)))