-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move TAP logic out of events #64
base: master
Are you sure you want to change the base?
Conversation
exodist
commented
Nov 22, 2015
- Move TAP logic from events to TAP formatter
- Port tests from events to the TAP formatter tests
- Maintain backcompat
- Deprecate to_tap
- Allow custom event support in TAP formatter
Eventually these will be completely removed, at the same time to_tap methods are removed.
* Add Test::Stream::Event::Skip * Add ctx->skip * deprecate debug->skip * Fix tests that expect Ok's for Skips.
unless $convert && ref($convert) eq 'CODE'; | ||
$CONVERTERS{$type} = $convert; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q) Is it expected nobody will wish to redefine how a TAP event is rendered?
I somehow get the impression somebody may wish to inject their own custom formatter for an existing event, but this may not be the right place for this.
If so: Comments to that effect should accompany the source for source divers, and POD documentation for register_event should be blindingly clear about this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want your own formatter you write a new formatter. Making changes to the TAP formatter is not advised.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*making changes to how the tap formatter renders pre-defined events is not advised. Adding new-custom events is not scary. If you want a "TAP" formatter that handles existing event types differently then you subclass the existing TAP formatter and tell Test::Stream to use your custom formatter.