more warnings tidyup
[p5sagit/p5-mst-13.2.git] / lib / Test / t / mix.t
CommitLineData
809908f7 1# -*-perl-*-
2use strict;
edd5bad5 3use Test qw(:DEFAULT $TESTOUT $ntest);
809908f7 4
edd5bad5 5### This test is crafted in such a way as to prevent Test::Harness from
6### seeing the todo tests, otherwise you get people sending in bug reports
7### about Test.pm having "UNEXPECTEDLY SUCCEEDED" tests.
8
9open F, ">mix";
10$TESTOUT = *F{IO};
11
12plan tests => 4, todo => [2,3];
13
14# line 15
809908f7 15ok(sub {
16 my $r = 0;
17 for (my $x=0; $x < 10; $x++) {
18 $r += $x*($r+1);
19 }
20 $r
21 }, 3628799);
22
23ok(0);
24ok(1);
25
26skip(1,0);
edd5bad5 27
28close F;
29$TESTOUT = *STDOUT{IO};
30$ntest = 1;
31
32open F, "mix";
33my $out = join '', <F>;
34close F;
35unlink "mix";
36
37my $expect = <<"EXPECT";
381..4 todo 2 3;
39ok 1
40not ok 2
41# Failed test 2 in $0 at line 23 *TODO*
42ok 3 # ($0 at line 24 TODO?!)
43ok 4 # skip
44EXPECT
45
46
47print "1..1\n";
48ok( $out, $expect );