[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 8/5] tap: support colorization of testsuite progress output
From: |
Ralf Wildenhues |
Subject: |
Re: [PATCH 8/5] tap: support colorization of testsuite progress output |
Date: |
Tue, 19 Jul 2011 21:19:06 +0200 |
* Stefano Lattarini wrote on Tue, Jul 19, 2011 at 11:47:21AM CEST:
> On Monday 18 July 2011, Ralf Wildenhues wrote:
> > > + grn => '[0;32m',
> > > + lgn => '[1;32m',
> > > + blu => '[1;34m',
> > > + mgn => '[0;35m',
> > > + brg => '[1m',
> > > + std => '[m',
> > > +);
> > > +sub decorate_result ($)
> > > +{
> > > + return $_[0] unless $cfg{"color-tests"};
> > > + # Best way to simulate a 'switch' construct here.
> >
> > Please don't, that only obfuscates the code. automake.in uses long
> > if ... else lists. If you don't like that,
> >
> I don't, at least not when using the GNU Coding Standards (as too much
> vertical space gets wasted IMO).
Maybe, but vertical space is less important than clear code. Your
version made me stumble and think for a moment whether all code paths
are clear.
> > use a map.
> >
> How would that be clearer? Honest question.
>
> Oh, or myabe you were suggesting to use an hash?
Yes, of course. Sorry for the lax terminology there.
Thanks,
Ralf
- Re: [PATCH 5/5] {test-protocols} tap: add experimental TAP-aware driver, (continued)