use strict; use warnings; use Test::More; Test::More->builder->output(\ my $scalar); is($_,$_,"equality $_") for 1..10; is(1,0,"FAIL"); done_testing;
C:/Strawberry/perl/bin\perl.exe -w d:/tmp/pm/redirect_Tests.pl # Failed test 'FAIL' # at d:/tmp/pm/redirect_Tests.pl line 11. # got: '1' # expected: '0' # Looks like you failed 1 test of 11.
... but it will still fill up $scalar with the passed tests.
Does Perl have a generic /dev/null filehandle to ignore output like on linux?
this works on Win, but it's not generic
open my $null,">","nul"; Test::More->builder->output($null);
Ah yes IO::Null is on cpan. :)
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re: Test::More to only report fails?
by LanX
in thread Test::More to only report fails?
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |