From: Rafael Garcia-Suarez Date: Mon, 27 Jul 2009 12:55:38 +0000 (+0200) Subject: Replace Test::More by test.pl X-Git-Tag: accepted/trunk/20130322.191538~11068 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0214bff6a3027ee423f9b2f01120bedb569584bd;p=platform%2Fupstream%2Fperl.git Replace Test::More by test.pl --- diff --git a/t/io/perlio.t b/t/io/perlio.t index c1eebec..c5f236d 100644 --- a/t/io/perlio.t +++ b/t/io/perlio.t @@ -6,9 +6,10 @@ BEGIN { print "1..0 # Skip: PerlIO not used\n"; exit 0; } + require './test.pl'; } -use Test::More tests => 39; +plan tests => 39; use_ok('PerlIO'); diff --git a/t/io/perlio_leaks.t b/t/io/perlio_leaks.t index 6bb6369..a7cdf28 100644 --- a/t/io/perlio_leaks.t +++ b/t/io/perlio_leaks.t @@ -1,9 +1,15 @@ #!perl # ioleaks.t +BEGIN { + chdir 't' if -d 't'; + @INC = '../lib'; + require './test.pl'; +} + use strict; use warnings; -use Test::More 'no_plan'; +plan 'no_plan'; # :unix -> not ok # :stdio -> not ok @@ -15,9 +21,9 @@ TODO: { my $base_fd = do{ open my $in, '<', $0 or die $!; fileno $in }; for(1 .. 3){ - local $TODO; + local $::TODO; if ($_ > 1 && $layer =~ /^:(unix|stdio)$/) { - $TODO = "[perl #56644] PerlIO resource leaks on open() and then :pop in :unix and :stdio" + $::TODO = "[perl #56644] PerlIO resource leaks on open() and then :pop in :unix and :stdio" } open my $fh, "<$layer", $0 or die $!; diff --git a/t/io/perlio_open.t b/t/io/perlio_open.t index e8e10fb..5f6a65c 100644 --- a/t/io/perlio_open.t +++ b/t/io/perlio_open.t @@ -16,12 +16,13 @@ BEGIN { print "1..0 # Skip: no Fcntl (how did you get this far?)\n"; exit 0; } + require './test.pl'; } use strict; use warnings; -use Test::More tests => 6; +plan tests => 6; use Fcntl qw(:seek); diff --git a/t/op/re.t b/t/op/re.t index d098bdc..8c1c1f8 100644 --- a/t/op/re.t +++ b/t/op/re.t @@ -1,14 +1,14 @@ #!./perl BEGIN { - chdir 't' if -d 't'; - @INC = '../lib'; + chdir 't' if -d 't'; + @INC = '../lib'; + require './test.pl'; } use strict; use warnings; -use Test::More; # test count at bottom of file use re qw(is_regexp regexp_pattern regname regnames regnames_count); { @@ -42,5 +42,5 @@ if ('1234'=~/(?:(?\d)|(?!))(?\d)(?\d)(?\d)/){ is(regnames_count(),3); } # New tests above this line, don't forget to update the test count below! -use Test::More tests => 14; +BEGIN { plan tests => 14 } # No tests here! diff --git a/t/op/reg_fold.t b/t/op/reg_fold.t index 3126dfc..2514452 100644 --- a/t/op/reg_fold.t +++ b/t/op/reg_fold.t @@ -3,11 +3,11 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; + require './test.pl'; } use strict; use warnings; -use Test::More; my $count=1; my @tests; @@ -32,7 +32,7 @@ while (<$fh>) { my $t=($cpv > 256 || $str=~/^do/) ? "unicode" : "latin"; push @tests, qq[ok($expr,'$chr=~/@fc/ix - $comment ($t string)')]; - $tests[-1]="TODO: { local \$TODO='[13:41] cue *It is all Greek to me* joke.';\n$tests[-1] }" + $tests[-1]="TODO: { local \$::TODO='[13:41] cue *It is all Greek to me* joke.';\n$tests[-1] }" if $cp eq '0390' or $cp eq '03B0'; $count++; } diff --git a/t/op/reg_posixcc.t b/t/op/reg_posixcc.t index f6391ef..df12063 100644 --- a/t/op/reg_posixcc.t +++ b/t/op/reg_posixcc.t @@ -3,11 +3,13 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; + require './test.pl'; } use strict; use warnings; -use Test::More 'no_plan'; # otherwise it would 38401 tests, which is, uh, a lot. :-) +plan "no_plan"; + my @pats=( "\\w", "\\W", @@ -40,7 +42,7 @@ my @pats=( "[:blank:]", "[:^blank:]" ); if (not $ENV{REAL_POSIX_CC}) { - $TODO = "Only works under PERL_LEGACY_UNICODE_CHARCLASS_MAPPINGS = 0"; + $::TODO = "Only works under PERL_LEGACY_UNICODE_CHARCLASS_MAPPINGS = 0"; } sub rangify { diff --git a/t/op/studytied.t b/t/op/studytied.t index f56cc17..288bcd7 100644 --- a/t/op/studytied.t +++ b/t/op/studytied.t @@ -3,12 +3,13 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; + require './test.pl'; } use strict; use warnings; -use Test::More tests => 14; +plan tests => 14; { package J;