1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-11 16:20:19 +02:00

More tests, in particular exercise #t result on empty body.

This commit is contained in:
Kevin Ryde 2004-08-25 01:05:35 +00:00
parent 9784c1ae52
commit a6fc65c6de

View file

@ -29,4 +29,50 @@
(pass-if "cond-expand srfi-2"
(cond-expand (srfi-2 #t)
(else #f))))
(else #f)))
(with-test-prefix "no bindings"
(pass-if "no result expression (gives #t)"
(and-let* ()))
(pass-if "result expression"
(and-let* ()
#t))
(pass-if "two result expressions"
(and-let* ()
#f
#t)))
(with-test-prefix "one binding"
(pass-if "no result expression (gives #t)"
(and-let* ((x 123))))
(pass-if "result expression"
(and-let* ((x 123))
#t))
(pass-if "result variable"
(and-let* ((x #t))
x))
(pass-if "two result expressions"
(and-let* ((x 123))
#f
#t)))
(with-test-prefix "one test"
(pass-if "no result expression (gives #t)"
(and-let* (( 123))))
(pass-if "result expression"
(and-let* (( 123))
#t))
(pass-if "two result expressions"
(and-let* (( 123))
#f
#t))))