Replace Test::More by test.pl
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Mon, 27 Jul 2009 12:55:38 +0000 (14:55 +0200)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Mon, 27 Jul 2009 13:34:33 +0000 (15:34 +0200)
t/io/perlio.t
t/io/perlio_leaks.t
t/io/perlio_open.t
t/op/re.t
t/op/reg_fold.t
t/op/reg_posixcc.t
t/op/studytied.t

index c1eebec..c5f236d 100644 (file)
@@ -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');
 
index 6bb6369..a7cdf28 100644 (file)
@@ -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 $!;
 
index e8e10fb..5f6a65c 100644 (file)
@@ -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);
 
index d098bdc..8c1c1f8 100644 (file)
--- 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'=~/(?:(?<A>\d)|(?<C>!))(?<B>\d)(?<A>\d)(?<B>\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!
index 3126dfc..2514452 100644 (file)
@@ -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] <BinGOs> cue *It is all Greek to me* joke.';\n$tests[-1] }"
+        $tests[-1]="TODO: { local \$::TODO='[13:41] <BinGOs> cue *It is all Greek to me* joke.';\n$tests[-1] }"
             if $cp eq '0390' or $cp eq '03B0';
         $count++;
     }
index f6391ef..df12063 100644 (file)
@@ -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 {
index f56cc17..288bcd7 100644 (file)
@@ -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;