Add tests for when and unless testing for implicit progn
This commit is contained in:
parent
b930ed8eba
commit
732a3f87b4
2 changed files with 12 additions and 0 deletions
|
@ -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)))
|
||||
|
|
6
t/when.t
6
t/when.t
|
@ -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)))
|
||||
|
|
Loading…
Reference in a new issue