forked from DGNum/liminix
report bodyless tests as PENDING
This commit is contained in:
parent
e9370358ae
commit
648382f64a
1 changed files with 6 additions and 4 deletions
|
@ -6,10 +6,12 @@
|
||||||
(fn fail [d msg] (set failed true) (print :FAIL d (.. "\n" msg)))
|
(fn fail [d msg] (set failed true) (print :FAIL d (.. "\n" msg)))
|
||||||
|
|
||||||
(macro example [description & body]
|
(macro example [description & body]
|
||||||
|
(if (. body 1)
|
||||||
`(let [(ok?# err#) (xpcall (fn [] ,body) debug.traceback)]
|
`(let [(ok?# err#) (xpcall (fn [] ,body) debug.traceback)]
|
||||||
(if ok?#
|
(if ok?#
|
||||||
(print :PASS ,description)
|
(print :PASS ,description)
|
||||||
(fail ,description err#))))
|
(fail ,description err#)))
|
||||||
|
`(print :PENDING ,description)))
|
||||||
|
|
||||||
(example
|
(example
|
||||||
"given an empty database, searching it finds no entries"
|
"given an empty database, searching it finds no entries"
|
||||||
|
|
Loading…
Reference in a new issue