Retract #20548 and #20465.
[p5sagit/p5-mst-13.2.git] / lib / Test / Simple / t / strays.t
CommitLineData
89c1e84a 1#!/usr/bin/perl -w
2
3# Check that stray newlines in test output are probably handed.
4
5BEGIN {
6 print "1..0 # Skip not completed\n";
7 exit 0;
8}
9
10BEGIN {
11 if( $ENV{PERL_CORE} ) {
12 chdir 't';
13 @INC = ('../lib', 'lib');
14 }
15 else {
16 unshift @INC, 't/lib';
17 }
18}
19chdir 't';
20
21use TieOut;
22local *FAKEOUT;
23my $out = tie *FAKEOUT, 'TieOut';
24
25
26use Test::Builder;
27my $Test = Test::Builder->new;
28my $orig_out = $Test->output;
29my $orig_err = $Test->failure_output;
30my $orig_todo = $Test->todo_output;
31
32$Test->output(\*FAKEOUT);
33$Test->failure_output(\*FAKEOUT);
34$Test->todo_output(\*FAKEOUT);
35$Test->no_plan();
36
37$Test->ok(1, "name\n");
38$Test->ok(0, "foo\nbar\nbaz");
39$Test->skip("\nmoofer");
40$Test->todo_skip("foo\n\n");
41