#!perl -w BEGIN { if( $ENV{PERL_CORE} ) { chdir 't'; @INC = '../lib'; } else { unshift @INC, 't/lib'; } } use strict; use Test::Builder; use Test::Builder::NoOutput; use Test::More; my $TB = Test::Builder->new; my $test = Test::Builder::NoOutput->create; $test->plan( tests => 3 ); local $ENV{HARNESS_ACTIVE} = 0; $test->ok(1, 'Foo'); $TB->is_eq($test->read(), <ok(0, 'Bar'); $TB->is_eq($test->read(), <ok(1, 'Yar'); $test->ok(1, 'Car'); $TB->is_eq($test->read(), <ok(0, 'Sar'); $TB->is_eq($test->read(), < 1; $test->_ending(); $TB->is_eq($test->read(), <<' END'); # Looks like you planned 3 tests but ran 5. # Looks like you failed 2 tests of 5 run. END } $TB->done_testing(5);