ceylon/ceylon-sdk — pull request #215 by lucaswerkmeister (2014-03-16 18:51:38+00:00)
Title: ceylon.test: add support for Test Anything Protocol

Adds
* a second `TestListener` that prints the test results in [Test Anything Protocol v13](http://testanything.org/tap-version-13-specification.html) format
* a `--tap` option to the runner to use a `TapLoggingListener` instead of a `SimpleLoggingListener`.

Benefits: can be used with the [TAP Jenkins plugin](https://wiki.jenkins-ci.org/display/JENKINS/TAP+Plugin) until someone writes a proper Jenkins - ceylon.test binding. Can also be used with [various other TAP consumers](http://testanything.org/consumers.html) (although some of them might not support version 13).

TAP looks like this:
```yaml
TAP version 13
ok 1 - test.my.module::testFeature
---
elapsed: 163
...
not ok 2 - test.my.module::testOtherFeature
---
elapsed: 11
severity: failure
actual: |
Lorem ipsum dolor sit amet ,
consetetur sadipscing elitr ,
sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat ,
sed diam voluptua .
expected: |
Lorem ipsum dolor sit amet,
consetetur sadipscing elitr,
sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat,
sed diam voluptua.
...
not ok 3 - test.my.module::testProposedFeature # SKIP ignored
---
reason: not yet implemented
...
not ok 4 - test.my.module::testBrokenFeature
---
elapsed: 15
severity: error
exception: |
java.lang.Exception: Error
at test.my.module.testBrokenFeature_.testBrokenFeature(testBrokenFeature.ceylon:3)
at com.redhat.ceylon.compiler.java.runtime.metamodel.AppliedFunction.$call$(AppliedFunction.java:257)
at com.redhat.ceylon.compiler.java.Util.apply(Util.java:934)
at com.redhat.ceylon.compiler.java.runtime.metamodel.Metamodel.apply(Metamodel.java:1099)
at com.redhat.ceylon.compiler.java.runtime.metamodel.AppliedFunction.apply(AppliedFunction.java:413)
at com.redhat.ceylon.compiler.java.runtime.metamodel.FreeFunction.invoke(FreeFunction.java:262)
at com.redhat.ceylon.compiler.java.runtime.metamodel.FreeFunction.invoke(FreeFunction.java:251)
<-- snip -->
(not snipped in actual output, only for pull request)
...
1..4