This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade to Test-Simple-0.82.
[perl5.git] / lib / Test / Simple / t / Builder / Builder.t
CommitLineData
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
4BEGIN {
a9153838
MS
5 if( $ENV{PERL_CORE} ) {
6 chdir 't';
7 @INC = '../lib';
8 }
33459055
MS
9}
10
11use Test::Builder;
12my $Test = Test::Builder->new;
13
a344be10 14$Test->plan( tests => 7 );
33459055
MS
15
16my $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
27my $test_num = $Test->current_test + 1;
28$Test->current_test( $test_num );
29print "ok $test_num - current_test() set\n";
30
31$Test->ok( 1, 'counter still good' );