Clear up test based on line number differences between the core and the
[p5sagit/p5-mst-13.2.git] / lib / Test / Simple / t / strays.t
1 #!/usr/bin/perl -w 
2
3 # Check that stray newlines in test output are probably handed.
4
5 BEGIN {
6     print "1..0 # Skip not completed\n";
7     exit 0;
8 }
9
10 BEGIN {
11     if( $ENV{PERL_CORE} ) {
12         chdir 't';
13         @INC = ('../lib', 'lib');
14     }
15     else {
16         unshift @INC, 't/lib';
17     }
18 }
19 chdir 't';
20
21 use TieOut;
22 local *FAKEOUT;
23 my $out = tie *FAKEOUT, 'TieOut';
24
25
26 use Test::Builder;
27 my $Test = Test::Builder->new;
28 my $orig_out  = $Test->output;
29 my $orig_err  = $Test->failure_output;
30 my $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