Test::Simple/More/Builder/Tutorial 0.41
[p5sagit/p5-mst-13.2.git] / lib / Test / Simple / t / buffer.t
1 #!/usr/bin/perl
2
3 BEGIN {
4     if( $ENV{PERL_CORE} ) {
5         chdir 't';
6         @INC = '../lib';
7     }
8 }
9
10 # Ensure that intermixed prints to STDOUT and tests come out in the
11 # right order (ie. no buffering problems).
12
13 use Test::More tests => 20;
14 my $T = Test::Builder->new;
15 $T->no_ending(1);
16
17 for my $num (1..10) {
18     $tnum = $num * 2;
19     pass("I'm ok");
20     $T->current_test($tnum);
21     print "ok $tnum - You're ok\n";
22 }
23 #!/usr/bin/perl
24
25 BEGIN {
26     if( $ENV{PERL_CORE} ) {
27         chdir 't';
28         @INC = '../lib';
29     }
30 }
31
32 # Ensure that intermixed prints to STDOUT and tests come out in the
33 # right order (ie. no buffering problems).
34
35 use Test::More tests => 20;
36 my $T = Test::Builder->new;
37 $T->no_ending(1);
38
39 for my $num (1..10) {
40     $tnum = $num * 2;
41     pass("I'm ok");
42     $T->current_test($tnum);
43     print "ok $tnum - You're ok\n";
44 }