In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/c3fcf49dfa6136c02c1f42a36f08c75a5f7a5c5c?hp=e8d9e9d0c5f9426c78756a60f2b68e10f38ce40e>

- Log -----------------------------------------------------------------
commit c3fcf49dfa6136c02c1f42a36f08c75a5f7a5c5c
Author: Colin Kuskie <[email protected]>
Date:   Thu Sep 13 23:25:58 2012 -0700

    Refactor t/lib/1_compile.t to use test.pl instead of making TAP by hand.
-----------------------------------------------------------------------

Summary of changes:
 t/lib/1_compile.t |   35 ++++++++++++++---------------------
 1 files changed, 14 insertions(+), 21 deletions(-)

diff --git a/t/lib/1_compile.t b/t/lib/1_compile.t
index a4dea83..2802ae2 100644
--- a/t/lib/1_compile.t
+++ b/t/lib/1_compile.t
@@ -7,9 +7,9 @@
 BEGIN {
     chdir 't';
     @INC = '../lib';
+    require './test.pl';
 }
 
-use strict;
 use warnings;
 use File::Spec::Functions;
 
@@ -27,28 +27,22 @@ if (eval { require Socket }) {
 
 @Core_Modules = sort @Core_Modules;
 
-print "1..".(1+@Core_Modules)."\n";
+plan tests => 1+@Core_Modules;
 
-my $message
-  = "ok 1 - All modules should have tests # TODO Make Schwern Poorer\n";
-if (@Core_Modules) {
-  print "not $message";
-} else {
-  print $message;
-}
-print <<'EOREWARD';
-# http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-04/msg01223.html
-# [email protected]
-EOREWARD
-
-my $test_num = 2;
+cmp_ok(@Core_Modules, '>', 0, "All modules should have tests");
+note("http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2001-04/msg01223.html";);
+note("20010421230349.P2946\@blackrider.blackstar.co.uk");
 
 foreach my $module (@Core_Modules) {
-    my $todo = '';
-    $todo = "# TODO $module needs porting on $^O" if $module eq 'ByteLoader' 
&& $^O eq 'VMS';
-    print "# $module compile failed\nnot " unless compile_module($module);
-    print "ok $test_num $todo\n";
-    $test_num++;
+    if ($module eq 'ByteLoader' && $^O eq 'VMS') {
+        TODO: {
+            local $TODO = "$module needs porting on $^O";
+            ok(compile_module($module), "compile $module");
+        }
+    }
+    else {
+        ok(compile_module($module), "compile $module");
+    }
 }
 
 # We do this as a separate process else we'll blow the hell
@@ -60,7 +54,6 @@ sub compile_module {
     my $lib     = '-I' . catdir(updir(), 'lib');
 
     my $out = scalar `$^X $lib $compmod $module`;
-    print "# $out";
     return $out =~ /^ok/;
 }
 

--
Perl5 Master Repository

Reply via email to