summaryrefslogtreecommitdiff
path: root/tests/read-print.scm
diff options
context:
space:
mode:
authorAndreas Enge <andreas@enge.fr>2023-03-20 18:21:47 +0100
committerAndreas Enge <andreas@enge.fr>2023-03-20 18:49:06 +0100
commitccb62d8feb50e2859d7c41429a9e3d9e0fe30bfe (patch)
tree4ab573cee33f277828ad553a22579175b1dda22d /tests/read-print.scm
parent098bd280f82350073e8280e37d56a14162eed09c (diff)
parentf80215c7c4ae5ea0c316f4766e6c05ae4218ede3 (diff)
Merge remote-tracking branch 'origin/master' into core-updates
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.