From bff9de84079dcc88b5b30bc6f963df39710489ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Mon, 1 Apr 2019 16:19:47 +0200 Subject: Add tests for let*. --- tests/let.scm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 tests/let.scm (limited to 'tests/let.scm') diff --git a/tests/let.scm b/tests/let.scm new file mode 100755 index 00000000..c2779657 --- /dev/null +++ b/tests/let.scm @@ -0,0 +1,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") -- cgit v1.2.3