看起来有些TAP::Harness
(v3.23)构造函数参数不喜欢一起玩。
当我尝试将formatter
arg 与verbosity
或color
args 一起指定时,模块会抱怨后两者无法识别。当我将其注释掉时,它工作得很好。难道我做错了什么?
use strict;
use warnings;
use TAP::Harness;
use TAP::Formatter::HTML;
print "TAP::Harness Version : $TAP::Harness::VERSION\n"; # 3.23
my $fmt = TAP::Formatter::HTML->new;
$fmt->output_file( 'test.html' );
my $harness = TAP::Harness
->new( {
color => 1,
verbosity => -2,
formatter => $fmt,
lib => $^O =~ /win/i
? [ 'C:\\some\\lib' ]
: [ '/usr/bin/etc/some/lib' ],
} );
输出(formatter
指定 arg):
Unknown arguments to TAP::Harness::new (color verbosity) at harness.pl line 41