jorgenschaefer / emacs-buttercup

Behavior-Driven Emacs Lisp Testing
GNU General Public License v3.0
360 stars 44 forks source link

Optionally don't print anything about skipped and/or passed tests #166

Closed doublep closed 3 years ago

doublep commented 4 years ago

Yet another implementation of the feature of "don't print anything about skipped tests" from issue #161. Additionally this implements one more option -q. When that is set, Buttercup prints only failed tests (with -s it prints failed and passed, by default it prints all, including skipped, as now).

This implementation adds function buttercup-reporter-delaying-adapter that can sit in front of any reporter and filter events sent to it according to variables buttercup-silent-skipping and buttercup-quiet. Unlike other proposed implementations, this can be used for any reporter by adding a single call to the adapter.

The implementation is also fairly small and almost doesn't touch existing code. It's quite unobvious, but I didn't add any comments since I felt like I would comment every single line then.

I failed to write tests (only tested manually) for this implementation, some commented-out attempt is in the commit. @snogge: can you help with this?

snogge commented 3 years ago

Another solution was merged from #184