martinmoene / lest

A modern, C++11-native, single-file header-only, tiny framework for unit-tests, TDD and BDD (includes C++98 variant)
Boost Software License 1.0
390 stars 45 forks source link

Terminal colors #11

Closed vimeitor closed 9 years ago

vimeitor commented 10 years ago

Hello!

It would be very nice if it could output the success/failures in some colors, as to make it easier to distinguish and easier for the eyes.

martinmoene commented 10 years ago

I may consider adding it as a compile-time feature, but don't expect it soon-ish.

vimeitor commented 10 years ago

Thank you for your consideration. I've taken a look at other projects and some of them use an awk script to do that (since ANSI colors do not work on Windows, as far as I know), so if you are worried about cross-platform compatibility, that might be the answer.

martinmoene commented 10 years ago

Hi @vimeitor,

I've added support for colourising the report, using ANSI codes.

See lest_FEATURE_COLOURISE in section Other macros.

cheers, Martin

vimeitor commented 10 years ago

Welp, what can I say? Thank you very much for taking your time on this and being so responsive. I recently found your project and have used in a couple of things and it works very very well. I will give it a try when I get to my computer, but I'm more than sure that it will do it :). Thank you again.

vimeitor commented 9 years ago

It works very well, so I'm closing this issue. Thank you :).

martinmoene commented 9 years ago

Good to 'hear', thanks for your feedback!