summaryrefslogtreecommitdiff
path: root/tests/read-print.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2022-08-08 11:49:44 +0200
committerLudovic Courtès <ludo@gnu.org>2022-08-08 11:54:25 +0200
commit6db3b34d7203639ef4286c237a6e536259f92352 (patch)
tree88a40baac71601b892657f5def4a516bf93209a5 /tests/read-print.scm
parentff9522fb69b9f4a31a5b766029e26dc53a2d1cf8 (diff)
read-print: Add 'case' and 'cond' special forms.
* guix/read-print.scm (%special-forms): Add 'case' and 'cond'. * tests/read-print.scm: Add tests.
Diffstat (limited to 'tests/read-print.scm')
-rw-r--r--tests/read-print.scm15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/read-print.scm b/tests/read-print.scm
index 004fcff19f..b484e28022 100644
--- a/tests/read-print.scm
+++ b/tests/read-print.scm
@@ -142,6 +142,21 @@ expressions."
(* z z)))")
(test-pretty-print "\
+(case x
+ ((1)
+ 'one)
+ ((2)
+ 'two))")
+
+(test-pretty-print "\
+(cond
+ ((zero? x)
+ 'zero)
+ ((odd? x)
+ 'odd)
+ (else #f))")
+
+(test-pretty-print "\
#~(string-append #$coreutils \"/bin/uname\")")
(test-pretty-print "\