develooper Front page | perl.perl5.porters | Postings from October 2001

[PATCH] Various test cleanups

From:
Rafael Garcia-Suarez
Date:
October 30, 2001 12:57
Subject:
[PATCH] Various test cleanups
Message ID:
20011030215626.A28503@rafael
For the DB_File tests, I moved the "use warnings/strict" *after*
the setting of @INC, and I fixed the number of tests to run when
skipped.
For Encode.t, this is only a simple typo fix.


--- ext/Encode.t.orig	Mon Jun 18 07:21:15 2001
+++ ext/Encode.t	Tue Oct 30 21:42:54 2001
@@ -2,7 +2,7 @@
     chdir 't' if -d 't';
     @INC = '../lib';
     require Config; import Config;
-    if ($Config{'extensions'} !~ /\Encode\b/) {
+    if ($Config{'extensions'} !~ /\bEncode\b/) {
       print "1..0 # Skip: Encode was not built\n";
       exit 0;
     }
--- ext/DB_File/t/db-btree.t.orig	Tue Oct 30 03:16:21 2001
+++ ext/DB_File/t/db-btree.t	Tue Oct 30 21:45:55 2001
@@ -1,8 +1,5 @@
 #!./perl -w
 
-use warnings;
-use strict;
-
 BEGIN {
     unless(grep /blib/, @INC) {
         chdir 't' if -d 't';
@@ -10,12 +7,14 @@
     }
 }
  
+use warnings;
+use strict;
 use Config;
  
 BEGIN {
     if(-d "lib" && -f "TEST") {
         if ($Config{'extensions'} !~ /\bDB_File\b/ ) {
-            print "1..163\n";
+            print "1..0 # Skip: DB_File was not built\n";
             exit 0;
         }
     }
--- ext/DB_File/t/db-hash.t.orig	Tue Oct 30 03:16:21 2001
+++ ext/DB_File/t/db-hash.t	Tue Oct 30 21:46:23 2001
@@ -1,8 +1,5 @@
 #!./perl 
 
-use warnings ;
-use strict ;
-
 BEGIN {
     unless(grep /blib/, @INC) {
         chdir 't' if -d 't';
@@ -10,12 +7,14 @@
     }
 }
  
+use warnings;
+use strict;
 use Config;
  
 BEGIN {
     if(-d "lib" && -f "TEST") {
         if ($Config{'extensions'} !~ /\bDB_File\b/ ) {
-            print "1..111\n";
+            print "1..0 # Skip: DB_File was not built\n";
             exit 0;
         }
     }
--- ext/DB_File/t/db-recno.t.orig	Tue Oct 30 03:16:21 2001
+++ ext/DB_File/t/db-recno.t	Tue Oct 30 21:51:55 2001
@@ -1,8 +1,5 @@
 #!./perl -w
 
-use warnings;
-use strict ;
-
 BEGIN {
     unless(grep /blib/, @INC) {
         chdir 't' if -d 't';
@@ -10,12 +7,14 @@
     }
 }
  
+use warnings;
+use strict;
 use Config;
  
 BEGIN {
     if(-d "lib" && -f "TEST") {
         if ($Config{'extensions'} !~ /\bDB_File\b/ ) {
-            print "1..138\n";
+            print "1..0 # Skip: DB_File was not built\n";
             exit 0;
         }
     }



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About