summary refs log tree commit diff
path: root/tests/read-print.scm
diff options
context:
space:
mode:
Diffstat (limited to 'tests/read-print.scm')
-rw-r--r--tests/read-print.scm24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/read-print.scm b/tests/read-print.scm
index 79a4101be6..f4627e076a 100644
--- a/tests/read-print.scm
+++ b/tests/read-print.scm
@@ -211,6 +211,15 @@ mnopqrstuvwxyz.\")"
                    #:max-width 33)
 
 (test-pretty-print "\
+(list ;margin comment
+      a b c)")
+
+(test-pretty-print "\
+(list
+ ;; This is a line comment immediately following the list head.
+ #:test-flags #~(list \"-m\" \"not external and not samples\"))")
+
+(test-pretty-print "\
 (modify-phases %standard-phases
   (replace 'build
     ;; Nicely indented in 'modify-phases' context.
@@ -223,6 +232,21 @@ mnopqrstuvwxyz.\")"
   (replace \"gmp\" gmp))")
 
 (test-pretty-print "\
+#~(modify-phases phases
+    (add-after 'whatever 'something-else
+      (lambda _
+        ;; This comment appears inside a gexp.
+        42)))")
+
+(test-pretty-print "\
+#~(list #$@(list coreutils ;yup
+                 grep) ;margin comment
+        #+sed
+
+        ;; Line comment.
+        #$grep)")
+
+(test-pretty-print "\
 (package
   ;; Here 'sha256', 'base32', and 'arguments' must be
   ;; immediately followed by a newline.