This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade to Test::More 0.07.
authorJarkko Hietaniemi <jhi@iki.fi>
Wed, 27 Jun 2001 17:11:28 +0000 (17:11 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 27 Jun 2001 17:11:28 +0000 (17:11 +0000)
p4raw-id: //depot/perl@10992

MANIFEST
lib/Test/More.pm
lib/Test/More/Changes [new file with mode: 0644]
lib/Test/More/t/fail-like.t
lib/Test/More/t/fail.t
lib/Test/More/t/plan_is_noplan.t
lib/Test/More/t/skipall.t

index 0cf83a8..6d31ecc 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -1094,6 +1094,7 @@ lib/Test.pm                       A simple framework for writing test scripts
 lib/Test/Harness.pm            A test harness
 lib/Test/Harness.t             See if Test::Harness works
 lib/Test/More.pm                More utilities for writing tests
+lib/Test/More/Changes          Test::More changes
 lib/Test/More/t/More.t          Test::More test, basic operation
 lib/Test/More/t/fail-like.t     Test::More test, like() and qr// bug
 lib/Test/More/t/fail.t          Test::More test, failing tests
index da35d26..971e33f 100644 (file)
@@ -22,7 +22,7 @@ BEGIN {
 
 require Exporter;
 use vars qw($VERSION @ISA @EXPORT);
-$VERSION = '0.06';
+$VERSION = '0.07';
 @ISA    = qw(Exporter);
 @EXPORT = qw(ok use_ok require_ok
              is isnt like
@@ -501,12 +501,8 @@ The $if condition is optional, but $why is not.
 
 =cut
 
-sub skip (&$$;$) {
-    my($tests, $how_many, $why, $if) = @_;
-
-    if( $if ) {
-
-    }
+sub skip {
+    die "skip() is UNIMPLEMENTED!";
 }
 
 =item B<todo>  * UNIMPLEMENTED *
@@ -533,8 +529,8 @@ whole suite dependent on that new feature.
 
 =cut
 
-sub todo (&$$;$) {
-    my($tests, $how_many, $name, $if) = @_;
+sub todo {
+    die "todo() is UNIMPLEMENTED!";
 }
 
 =head2 Comparision functions
diff --git a/lib/Test/More/Changes b/lib/Test/More/Changes
new file mode 100644 (file)
index 0000000..c09ffd9
--- /dev/null
@@ -0,0 +1,32 @@
+Revision history for Perl extension Test::More.
+
+0.07  Wed Jun 27 03:06:56 EDT 2001
+    - VMS and Win32 fixes.  Nothing was actually wrong, but the tests
+      had little problems.
+    - like()'s failure report wasn't always accurate
+
+0.06  Fri Jun 15 14:39:50 EDT 2001
+    - Guarding against $/ and -l
+    - Reformatted the way failed tests are reported to make them stand out
+      a bit better.
+    - Fixed tests without names
+
+0.05  Tue Jun 12 16:16:55 EDT 2001
+    * use Test::More no_plan; implemented
+
+0.04  Thu Jun  7 11:26:18 BST 2001
+    - minor bug in eq_set() with complex data structures
+      Thanks to Tatsuhiko Miyagawa for finding this.
+
+0.03  Tue Jun  5 19:59:59 BST 2001
+    - Fixed export problem in 5.004.
+    - prototyped the functions properly
+    * fixed bug with like() involving qr//
+
+0.02  Thu Apr  5 12:48:48 BST 2001
+    - Fixed Makefile.PL to work around MakeMaker bug that 'use's Test::Simple
+      instead of 'require'ing.
+
+0.01  Fri Mar 30 07:49:14 GMT 2001
+    - First working version
+
index 69d8574..9bac0af 100644 (file)
@@ -22,10 +22,12 @@ my $test_num = 1;
 # Utility testing functions.
 sub ok ($;$) {
     my($test, $name) = @_;
-    print "not " unless $test;
-    print "ok $test_num";
-    print " - $name" if defined $name;
-    print "\n";
+    my $ok = '';
+    $ok .= "not " unless $test;
+    $ok .= "ok $test_num";
+    $ok .= " - $name" if defined $name;
+    $ok .= "\n";
+    print $ok;
     $test_num++;
 }
 
@@ -33,7 +35,7 @@ sub ok ($;$) {
 package main;
 require Test::More;
 
-push @INC, 'lib/Test/More/';
+push @INC, 't', '.';
 require Catch;
 my($out, $err) = Catch::caught();
 
index e33d529..d684e65 100644 (file)
@@ -9,10 +9,12 @@ my $test_num = 1;
 # Utility testing functions.
 sub ok ($;$) {
     my($test, $name) = @_;
-    print "not " unless $test;
-    print "ok $test_num";
-    print " - $name" if defined $name;
-    print "\n";
+    my $ok = '';
+    $ok .= "not " unless $test;
+    $ok .= "ok $test_num";
+    $ok .= " - $name" if defined $name;
+    $ok .= "\n";
+    print $ok;
     $test_num++;
 }
 
@@ -20,7 +22,7 @@ sub ok ($;$) {
 package main;
 require Test::More;
 
-push @INC, 'lib/Test/More/';
+push @INC, 't', '.';
 require Catch;
 my($out, $err) = Catch::caught();
 
@@ -52,28 +54,29 @@ not ok 8 - require ALL::YOUR::BASE::ARE::BELONG::TO::US::wibble;
 OUT
 
     my $err_re = <<ERR;
-#     Failed test ($0 at line 29)
-#     Failed test ($0 at line 30)
+#     Failed test ($0 at line 31)
+#     Failed test ($0 at line 32)
 #          got: 'foo'
 #     expected: 'bar'
-#     Failed test ($0 at line 31)
+#     Failed test ($0 at line 33)
 #     it should not be 'foo'
 #     but it is.
-#     Failed test ($0 at line 32)
+#     Failed test ($0 at line 34)
 #     it should not be 'foo'
 #     but it is.
-#     Failed test ($0 at line 34)
+#     Failed test ($0 at line 36)
 #                   'foo'
 #     doesn't match '/that/'
-#     Failed test ($0 at line 36)
+#     Failed test ($0 at line 38)
 ERR
 
+   my $filename = quotemeta $0;
    my $more_err_re = <<ERR;
-#     Failed test \\($0 at line 38\\)
+#     Failed test \\($filename at line 40\\)
 #     Tried to use 'Hooble::mooble::yooble'.
 #     Error:  Can't locate Hooble.* in \\\@INC .*
 
-#     Failed test \\($0 at line 39\\)
+#     Failed test \\($filename at line 41\\)
 #     Tried to require 'ALL::YOUR::BASE::ARE::BELONG::TO::US::wibble'.
 #     Error:  Can't locate ALL.* in \\\@INC .*
 
index 25319d8..29ccd6b 100644 (file)
@@ -7,10 +7,12 @@ my $test_num = 1;
 # Utility testing functions.
 sub ok ($;$) {
     my($test, $name) = @_;
-    print "not " unless $test;
-    print "ok $test_num";
-    print " - $name" if defined $name;
-    print "\n";
+    my $ok = '';
+    $ok .= "not " unless $test;
+    $ok .= "ok $test_num";
+    $ok .= " - $name" if defined $name;
+    $ok .= "\n";
+    print $ok;
     $test_num++;
 }
 
@@ -19,7 +21,7 @@ package main;
 
 require Test::More;
 
-push @INC, 'lib/Test/More/';
+push @INC, 't', '.';
 require Catch;
 my($out, $err) = Catch::caught();
 
index c0137cc..bfee83d 100644 (file)
@@ -9,10 +9,12 @@ my $test_num = 1;
 # Utility testing functions.
 sub ok ($;$) {
     my($test, $name) = @_;
-    print "not " unless $test;
-    print "ok $test_num";
-    print " - $name" if defined $name;
-    print "\n";
+    my $ok = '';
+    $ok .= "not " unless $test;
+    $ok .= "ok $test_num";
+    $ok .= " - $name" if defined $name;
+    $ok .= "\n";
+    print $ok;
     $test_num++;
 }
 
@@ -20,7 +22,7 @@ sub ok ($;$) {
 package main;
 require Test::More;
 
-push @INC, 'lib/Test/More/';
+push @INC, 't', '.';
 require Catch;
 my($out, $err) = Catch::caught();