Subject: Re: [PATCH v8] gitweb: add test suite with Test::WWW::Mechanize::CGI

From: Jakub Narebski <[email-masked]>
Date: Tue, 1 Jul 2008 00:01:42 +0200

[back-to-list]

On Mon, 30 Jun 2008, Lea Wiemann wrote:
> [off-list]
[...]
 
> By the way, I found the supercat (spc) colorizer very helpful for the
> mechanize tests, since the output tends to be long and the lines wrap a
> lot.  Here are my regexes:
> 
> $ cat ~/.spcrc/spcrc-test_more
> #  HTML COLOR NAME   COL A N T STRING or REGULAR EXPRESSION
> #################### ### # # # #########################################
> Black                blk     r (.*)
> Green                grn b   r (^ok .*)
> Red                  red b   r (^not ok)
> Yellow               yel b   r (^not ok .* # TODO.*)
> Green                grn     r (^ok .*\[auto\].*)
> Red                  red     r (^not ok .*\[auto\].*)
> Yellow               yel     r (^not ok .*\[auto\].* # TODO.*)
> Black                blk     r ( - .*)
> Green                grn r   r (\* passed all .*)
> Red                  red r   r (\* failed .*)
> 
> Then you can just run
> 
> ./t9503-gitweb-Mechanize.sh -v -l 2>&1 | spc -t test_more
> 
> Hope it's useful!

Hmmm... it would be nice if 'test_external*' functions supported syntax
highlighting of command output if it follows TAP: Test Anything Protocol
http://www.perlfoundation.org/perl5/index.cgi?testing#tap_test_anything_protocol
in a manner similar to coloring native tests (using git_expect_success,
git_expect_failure etc.).

Test::More as far as I know produces TAP-compatibile output.

-- 
Jakub Narebski
Poland