Minilisp.pm/t/unless.t

10 lines
247 B
Perl
Raw Normal View History

2021-04-04 01:53:18 +02:00
(expect "unless - true condition"
(null (unless t 'fail)))
(expect "unless - false condition"
(equal 'ok (unless nil 'ok)))
(let ((a 'ok))
(unless t (set a 'fail))
(expect "unless - does not evaluate on true" (equal a 'ok)))