简体   繁体   English

如何禁用冗余Perl证明输出?

[英]How to disable redundant perl prove output?

prove gives me output like this: prove给我这样的输出:

$ prove t/HealthScores.t 
t/HealthScores.t .. ok   
All tests successful.
Files=1, Tests=2,  0 wallclock secs ( 0.04 usr  0.00 sys +  0.16 cusr  0.01 csys =  0.21 CPU)
Result: PASS

For me the last two lines are redundant and unnecessary. 对我来说,最后两行是多余的,不必要的。 I'd like to disable their display but can't find a CLI switch for this. 我想禁用其显示,但无法为此找到CLI开关。 Eg, I'd like to only see this: 例如,我只想看到以下内容:

$ prove t/HealthScores.t
t/HealthScores.t .. ok
All tests successful.

Any ideas? 有任何想法吗?

No. These are not output conditionally. 不。这些不是有条件输出的。

if ( $aggregate->all_passed ) {
    $self->_output_success("All tests successful.\n");
}

...

my $files = @$tests;
$self->_output("Files=$files, Tests=$total, $runtime\n");
my $status = $aggregate->get_status;
$self->_output("Result: $status\n");

Though there does appear to be a way to silence these and other messages since the above is preceded by 尽管似乎确实有一种方法可以使这些消息和其他消息保持静音,因为上述内容之前

return if $self->silent;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM