Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

test output in colour ?

by cutlass2006 (Pilgrim)
on Feb 11, 2008 at 13:59 UTC ( [id://667382]=perlquestion: print w/replies, xml ) Need Help??

cutlass2006 has asked for the wisdom of the Perl Monks concerning the following question:

GentleMonks,

I am seeking top tips for making test output beautiful; perhaps just some sort of colorizing will do.

I use basic test modules like Test::More, Test:Env, Test::Files, etc

thx in advance.

Replies are listed 'Best First'.
Re: test output in colour ?
by johngg (Canon) on Feb 11, 2008 at 14:54 UTC
Re: test output in colour ?
by Fletch (Bishop) on Feb 11, 2008 at 15:01 UTC

    Maybe Test::Builder::Tester::Color would be of interest?

    Worst case you probably could write a filter to postprocess your test output (i.e. something analogous to what colordiff does for diff output).

    The cake is a lie.
    The cake is a lie.
    The cake is a lie.

Re: test output in colour ?
by grinder (Bishop) on Feb 11, 2008 at 15:29 UTC

    I'm pretty sure you get this for free with Test::Harness 3.0. Upgrade that, and everything else should follow just nicely.

    • another intruder with the mooring in the heart of the Perl

      Yup, it's built-in. If we think the output isn't going to a terminal or if you don't have the correct modules installed, we disable the color output. You can also do this manually with the --nocolor switch.

      Cheers,
      Ovid

      New address of my CGI Course.

        The terminal detection is really annoying. I often pipe colorful output to `less -r'. If tools stopped istty() then my tools would work better. Same goes for ack.

        ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://667382]
Approved by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (6)
As of 2024-04-25 10:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found