diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2022-08-08 11:49:44 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2022-08-08 11:54:25 +0200 |
| commit | 6db3b34d7203639ef4286c237a6e536259f92352 (patch) | |
| tree | 88a40baac71601b892657f5def4a516bf93209a5 /tests | |
| parent | ff9522fb69b9f4a31a5b766029e26dc53a2d1cf8 (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')
| -rw-r--r-- | tests/read-print.scm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/read-print.scm b/tests/read-print.scm index 004fcff19f1..b484e280227 100644 --- a/tests/read-print.scm +++ b/tests/read-print.scm | |||
| @@ -142,6 +142,21 @@ expressions." | |||
| 142 | (* z z)))") | 142 | (* z z)))") |
| 143 | 143 | ||
| 144 | (test-pretty-print "\ | 144 | (test-pretty-print "\ |
| 145 | (case x | ||
| 146 | ((1) | ||
| 147 | 'one) | ||
| 148 | ((2) | ||
| 149 | 'two))") | ||
| 150 | |||
| 151 | (test-pretty-print "\ | ||
| 152 | (cond | ||
| 153 | ((zero? x) | ||
| 154 | 'zero) | ||
| 155 | ((odd? x) | ||
| 156 | 'odd) | ||
| 157 | (else #f))") | ||
| 158 | |||
| 159 | (test-pretty-print "\ | ||
| 145 | #~(string-append #$coreutils \"/bin/uname\")") | 160 | #~(string-append #$coreutils \"/bin/uname\")") |
| 146 | 161 | ||
| 147 | (test-pretty-print "\ | 162 | (test-pretty-print "\ |
