ClojureDocs

名称空间

clojure.test.tap

clojure.test extensions for the Test Anything Protocol (TAP)

  TAP is a simple text-based syntax for reporting test results.  TAP
  was originally developed for Perl, and now has implementations in
  several languages.  For more information on TAP, see
  http://testanything.org/ and
  http://search.cpan.org/~petdance/TAP-1.0.0/TAP.pm

  To use this library, wrap any calls to
  clojure.test/run-tests in the with-tap-output macro,
  like this:

    (use 'clojure.test)
    (use 'clojure.test.tap)

    (with-tap-output
     (run-tests 'my.cool.library))
clojure.test.tap 中的变量

p

print-tap-diagnostic
打印一条 TAP 诊断行。
print-tap-fail
打印一行 TAP ‘not ok’。msg 是一行不换行的字符串
print-tap-pass
打印一行 TAP ‘ok’。msg 是一行不换行的字符串
print-tap-plan
打印一行类似 ‘1..n’ 的 TAP 计划。n 表示测试数

w

with-tap-output
使用修改后的测试报告函数执行 body,这些函数会产生 TAP 输出