aboutsummaryrefslogtreecommitdiff
path: root/tests/let.scm
blob: c27796575009f2e52cf0005bcd4302c26b0171d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/guile \
-s
!#

(add-to-load-path (string-append (dirname (dirname (current-filename)))
                                 "/module"))

(use-modules (srfi srfi-64)
             (util))

(test-begin "let")

(test-assert (let* ((a #t)) a))
(test-assert (let* (((a . b) '(#t . #f))) a))
(test-assert (let* (((a . b) (cons* #f #t))) b))
(test-assert (let* ((a b c (values #f #t #f))) b))
(test-assert (let* (((a b c) (list #f #t #f))) b))
(test-assert (let* (((a) '(#t))) a))
(test-equal '(2) (let* (((a . b) '(1 2))) b))
(test-equal '(3 4) (let* (((a b . c) '(1 2 3 4))) c))

(test-end "let")