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

MANIFEST
lib/Test/Simple.pm
lib/Test/Simple/Changes [new file with mode: 0644]
lib/Test/Simple/t/exit.t
lib/Test/Simple/t/extra.t
lib/Test/Simple/t/fail.t
lib/Test/Simple/t/missing.t
lib/Test/Simple/t/no_plan.t
lib/Test/Simple/t/plan_is_noplan.t

index 6d31ecc..b9119d0 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -1101,6 +1101,7 @@ lib/Test/More/t/fail.t          Test::More test, failing tests
 lib/Test/More/t/plan_is_noplan.t        Test::More test, noplan
 lib/Test/More/t/skipall.t       Test::More test, skipping all tests
 lib/Test/Simple.pm              Basic utility for writing tests
+lib/Test/Simple/Changes                Test::Simple changes
 lib/Test/Simple/t/exit.t        Test::Simple test, exit codes
 lib/Test/Simple/t/extra.t       Test::Simple test
 lib/Test/Simple/t/fail.t        Test::Simple test, test failures
index a66f5ce..e4727da 100644 (file)
@@ -2,7 +2,7 @@ package Test::Simple;
 
 require 5.004;
 
-$Test::Simple::VERSION = '0.08';
+$Test::Simple::VERSION = '0.09';
 
 my(@Test_Results) = ();
 my($Num_Tests, $Planned_Tests, $Test_Died) = (0,0,0);
diff --git a/lib/Test/Simple/Changes b/lib/Test/Simple/Changes
new file mode 100644 (file)
index 0000000..ef69c61
--- /dev/null
@@ -0,0 +1,44 @@
+Revision history for Perl extension Test::Simple
+
+0.09  Wed Jun 27 02:55:54 EDT 2001
+    - VMS fixes
+
+0.08  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.
+
+0.07  Tue Jun 12 15:55:54 BST 2001
+    - 'use Test::Simple' by itself no longer causes death
+    - Yet more fixes for death in eval
+    - Limiting max failures reported via exit code to 254.
+
+0.06  Wed May  9 23:38:17 BST 2001
+    - Whoops, left a private method in the public docs.
+
+0.05  Wed May  9 20:40:35 BST 2001
+    - Forgot to include the exit tests.
+    - Trouble with exiting properly under 5.005_03 and 5.6.1 fixed
+    - Turned off buffering
+    * 5.004 new minimum version
+    - Now explicitly tested with 5.6.1, 5.6.0, 5.005_03 and 5.004
+
+0.04  Mon Apr  2 11:05:01 BST 2001
+    - Fixed "require Test::Simple" so it doesn't bitch and exit 255
+    - Now installable with the CPAN shell.
+
+0.03  Fri Mar 30 08:08:33 BST 2001
+    - ok() now prints on what line and file it failed.
+    - eval 'die' was considered abnormal.  Fixed.
+
+0.02  Fri Mar 30 05:12:14 BST 2001      *UNRELEASED*
+    - exit codes tested
+    * exit code on abnormal exit changed to 255 (thanks to Tim Bunce for
+      pointing out that Unix can't do negative exit codes)
+    - abnormal exits now better caught.
+    - No longer using Test.pm to test this, but still minimum of 5.005
+      due to needing $^S.
+
+0.01  Wed Mar 28 06:44:44 BST 2001
+    - First working version released to CPAN
+
index 369a417..7247a0c 100644 (file)
@@ -5,10 +5,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++;
 }
 
@@ -32,7 +34,7 @@ print "1..".keys(%Tests)."\n";
 
 chdir 't' if -d 't';
 while( my($test_name, $exit_code) = each %Tests ) {
-    my $wait_stat = system("$^X -I../lib -Ilib/Test/Simple/ lib/Test/Simple/sample_tests/$test_name");
+    my $wait_stat = system(qq{$^X -"I../blib/lib" sample_tests/$test_name});
     My::Test::ok( $wait_stat >> 8 == $exit_code, 
                   "$test_name exited with $exit_code" );
 }
index 707162a..ba04517 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::Simple;
 
-push @INC, 'lib/Test/Simple';
+push @INC, 't', '.';
 require Catch;
 my($out, $err) = Catch::caught();
 
@@ -42,8 +44,8 @@ not ok 5 - Sar
 OUT
 
     My::Test::ok($$err eq <<ERR);
-#     Failed test ($0 at line 29)
-#     Failed test ($0 at line 32)
+#     Failed test ($0 at line 31)
+#     Failed test ($0 at line 34)
 # Looks like you planned 3 tests but ran 2 extra.
 ERR
 
index 76de00e..c0bd42e 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++;
 }
 
@@ -21,7 +23,7 @@ package main;
 
 require Test::Simple;
 
-push @INC, 'lib/Test/Simple/';
+push @INC, 't', '.';
 require Catch;
 my($out, $err) = Catch::caught();
 
@@ -45,8 +47,8 @@ not ok 5 - damnit
 OUT
 
     My::Test::ok($$err eq <<ERR);
-#     Failed test ($0 at line 33)
-#     Failed test ($0 at line 34)
+#     Failed test ($0 at line 35)
+#     Failed test ($0 at line 36)
 # Looks like you failed 2 tests of 5.
 ERR
 
index d508fbe..867639b 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::Simple;
 
-push @INC, 'lib/Test/Simple/';
+push @INC, 't', '.';
 require Catch;
 my($out, $err) = Catch::caught();
 
@@ -36,7 +38,7 @@ not ok 2 - Bar
 OUT
 
     My::Test::ok($$err eq <<ERR);
-#     Failed test ($0 at line 29)
+#     Failed test ($0 at line 31)
 # Looks like you planned 5 tests but only ran 2.
 ERR
 
index d0f10cb..9e4290b 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::Simple;
 
-push @INC, 'lib/Test/Simple/';
+push @INC, 't', '.';
 require Catch;
 my($out, $err) = Catch::caught();
 
index 0c2a5cd..8cf11c5 100644 (file)
@@ -16,10 +16,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++;
 }
 
@@ -28,7 +30,7 @@ package main;
 
 require Test::Simple;
 
-push @INC, 'lib/Test/Simple/';
+push @INC, 't', '.';
 require Catch;
 my($out, $err) = Catch::caught();