mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
read-print: Add 'case' and 'cond' special forms.
* guix/read-print.scm (%special-forms): Add 'case' and 'cond'. * tests/read-print.scm: Add tests.
This commit is contained in:
@@ -141,6 +141,21 @@ expressions."
|
||||
(let ((z (+ x y)))
|
||||
(* 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\")")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user