Add tests for when and unless testing for implicit progn

This commit is contained in:
madmaurice 2021-04-06 23:40:10 +02:00
parent b930ed8eba
commit 732a3f87b4
2 changed files with 12 additions and 0 deletions

View file

@ -7,3 +7,9 @@
(let ((a 'ok))
(unless t (set a 'fail))
(expect "unless - does not evaluate on true" (equal a 'ok)))
(expect "unless - without body returns nil"
(null (unless nil)))
(expect "when - implicit progn"
(equal 'ok (unless nil 'wrong 'wrong2 'ok)))

View file

@ -7,3 +7,9 @@
(let ((a 'ok))
(when nil (set a 'fail))
(expect "when - does not evaluate on false" (equal a 'ok)))
(expect "when - without body returns nil"
(null (when t)))
(expect "when - implicit progn"
(equal 'ok (when t 'wrong 'wrong2 'ok)))