I am trying to get color output using the / TAP :: Harness proof method with Perl active in Windows 7.
Actual tests run fine, namely that there is no color output.
I get a similar problem using Strawberry Perl and WinXP.
I can not use * nix and cygwin or other third parties xterm, both of which make color output.
I know its a little picky thing, but I think I became addicted to green :-)
Is there a simple fix? - I could not see anything on the Activate state website - I was thinking about raising an error. Any debugging guide or check?
Should I write my own formatter?
Thanks in advance for your help.
More information on installed modules and approaches ...
They are installed and, as far as I know, work
Win32::Console::ANSI; Term::ANSIColor;
This test script worked:
#!/usr/bin/perl use strict; use warnings; use Win32::Console::ANSI; use Term::ANSIColor; print "One fish\n"; print "Two fish\n"; print color("red"), "Red Fish\n", color("reset"); print color("blue"), "Blue Fish\n", color("reset");
I tried:
prove prove -c
and using the following test harnesses with and without a format I was assuming color was turned on by default.
#!/usr/bin/perl use strict; use warnings; use TAP::Harness; my @tests = glob( 't/*.t' ); my $harness = TAP::Harness->new(); $harness->runtests( @tests );
I also installed the HTML formatter and it seems to work.
prove --formatter=TAP::Formatter::HTML
Duration:
prove --formatter=TAP::Formatter::Color
gives Unable to find the "verbosity" method of an object method through the package "TAP :: Formatter :: Color" on page x: /Perl/site/lib/TAP/Harness.pm 679.
Thanks Mike