Commit | Line | Data |
---|---|---|
33459055 | 1 | #!/usr/bin/perl -w |
ccbd73a4 | 2 | # $Id: /mirror/googlecode/test-more/t/Builder/Builder.t 60332 2008-09-09T12:24:03.060291Z schwern $ |
33459055 MS |
3 | |
4 | BEGIN { | |
a9153838 MS |
5 | if( $ENV{PERL_CORE} ) { |
6 | chdir 't'; | |
7 | @INC = '../lib'; | |
8 | } | |
33459055 MS |
9 | } |
10 | ||
11 | use Test::Builder; | |
12 | my $Test = Test::Builder->new; | |
13 | ||
a344be10 | 14 | $Test->plan( tests => 7 ); |
33459055 MS |
15 | |
16 | my $default_lvl = $Test->level; | |
17 | $Test->level(0); | |
18 | ||
19 | $Test->ok( 1, 'compiled and new()' ); | |
20 | $Test->ok( $default_lvl == 1, 'level()' ); | |
21 | ||
22 | $Test->is_eq('foo', 'foo', 'is_eq'); | |
23 | $Test->is_num('23.0', '23', 'is_num'); | |
24 | ||
6686786d MS |
25 | $Test->is_num( $Test->current_test, 4, 'current_test() get' ); |
26 | ||
27 | my $test_num = $Test->current_test + 1; | |
28 | $Test->current_test( $test_num ); | |
29 | print "ok $test_num - current_test() set\n"; | |
30 | ||
31 | $Test->ok( 1, 'counter still good' ); |