2021-04-04 01:53:18 +02:00
|
|
|
(expect "unless - true condition"
|
|
|
|
(null (unless t 'fail)))
|
|
|
|
|
|
|
|
(expect "unless - false condition"
|
2021-04-05 00:06:49 +02:00
|
|
|
(equal 'ok (unless nil 'ok)))
|
2021-04-05 04:07:22 +02:00
|
|
|
|
|
|
|
(let ((a 'ok))
|
|
|
|
(unless t (set a 'fail))
|
|
|
|
(expect "unless - does not evaluate on true" (equal a 'ok)))
|
2021-04-06 23:40:10 +02:00
|
|
|
|
|
|
|
(expect "unless - without body returns nil"
|
|
|
|
(null (unless nil)))
|
|
|
|
|
|
|
|
(expect "when - implicit progn"
|
|
|
|
(equal 'ok (unless nil 'wrong 'wrong2 'ok)))
|