Skip to content
This repository has been archived by the owner on Oct 6, 2020. It is now read-only.

Latest commit

 

History

History
39 lines (30 loc) · 586 Bytes

README.markdown

File metadata and controls

39 lines (30 loc) · 586 Bytes

What?

A simple TAP implementation in (Guile) Scheme.

Why?

I wanted to experiment with Scheme a bit and unit testing with TAP is quite cool.

How?

(use-modules (guile-tap))

(planned-tests 3)

(ok (= 1 1))
(ok (not (null? '(21))))

(diagnostic "Skip some tests...")
(skip #t
  (list
    '(ok (= 1 1))
    '(ok (not (= 1 2))))
  ; Optional reason
  "A reason")

(diagnostic "Bail out...")
(bail-out!)

(diagnostic "Todo is supported as well...")
(todo
  (list
    '(ok (= 1 1)))
    ; Optional note
  "A note")

(ok (throws? (/ 1 0)) "Test for exception")