scm: Support test failure expectation.
* module/mes/test.mes (result): Take second argument to mean expected failure count.
This commit is contained in:
parent
08c04ff845
commit
3b527affa3
|
@ -34,11 +34,13 @@
|
|||
(lambda (. t)
|
||||
(cond ((or (null? t) (eq? (car t) result)) (list pass fail))
|
||||
((eq? (car t) 'report)
|
||||
(let ((expect (if (null? (cdr t)) 0 (cadr t))))
|
||||
(newline)
|
||||
(display "passed: ") (display pass) (newline)
|
||||
(display "failed: ") (display fail) (newline)
|
||||
(if (not (eq? expect 0)) (begin (display "expect: ") (display expect) (newline)))
|
||||
(display "total: ") (display (+ pass fail)) (newline)
|
||||
(exit fail))
|
||||
(exit (if (eq? expect fail) 0 fail))))
|
||||
((car t) (display ": pass") (newline) (set! pass (+ pass 1)))
|
||||
(#t (display ": fail") (newline) (set! fail (+ fail 1)))))))
|
||||
|
||||
|
|
Loading…
Reference in a new issue