tokuhirom/Test-Pretty — pull request #28 by lejeunerenard (2014-12-12 05:11:22+00:00)
Title: Implemented new Test::* paradigm

I rewrote `Test::Pretty` to use the new `Test::Stream` API in `Test::More`'s alphas. So far all tests pass with Test::More 1.301001_084

The code has been structured so that all events emitted by a stream are processed via `stream_listener()`. This way tests can be printed recursively (e.g. subtests). `stream_listener()` adds "pretty" output for 3 different events:

1. `subtest` events are printed as "pretty" `ok()`s if subtests are not set to 'delayed'. Otherwise they print their name and then recurse through their child tests. They do not end with an `ok()` anymore.
2. `ok` events are printed same as before.
3. `plan` events are printed if they are a `SKIP`. The rest are ignored.

Everything else is delegated to it's default rendering.

Closes #25

_Notes:_

- Added `TEST_PRETTY_INDENT` env variable to set indention
- `subtest` names are no longer half indented.
- To differentiate between a "pretty" ok and the dummy tap, I created a new event called `Test::Stream::Event::DummyTap` which outputs the same dummy tap as before. This utilizes the same filehandle as `Test::More` instead of directly writing to `STDOUT`.
- Removed code that set the exit code so that `Test::More` can do that for us.
- Todo items inside a subtest do not know they are in todo given the context is hidden by `Test::Stream`.