Change 10993 by jhi@alpha on 2001/06/27 17:17:30
Upgrade to Test::Simple 0.09.
Affected files ...
... //depot/perl/MANIFEST#483 edit
... //depot/perl/lib/Test/Simple.pm#2 edit
... //depot/perl/lib/Test/Simple/Changes#1 add
... //depot/perl/lib/Test/Simple/t/exit.t#2 edit
... //depot/perl/lib/Test/Simple/t/extra.t#2 edit
... //depot/perl/lib/Test/Simple/t/fail.t#2 edit
... //depot/perl/lib/Test/Simple/t/missing.t#2 edit
... //depot/perl/lib/Test/Simple/t/no_plan.t#2 edit
... //depot/perl/lib/Test/Simple/t/plan_is_noplan.t#2 edit
Differences ...
==== //depot/perl/MANIFEST#483 (text) ====
Index: perl/MANIFEST
--- perl/MANIFEST.~1~ Wed Jun 27 16:00:12 2001
+++ perl/MANIFEST Wed Jun 27 16:00:12 2001
@@ -1101,6 +1101,7 @@
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
==== //depot/perl/lib/Test/Simple.pm#2 (text) ====
Index: perl/lib/Test/Simple.pm
--- perl/lib/Test/Simple.pm.~1~ Wed Jun 27 16:00:12 2001
+++ perl/lib/Test/Simple.pm Wed Jun 27 16:00:12 2001
@@ -2,7 +2,7 @@
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);
==== //depot/perl/lib/Test/Simple/t/exit.t#2 (text) ====
Index: perl/lib/Test/Simple/t/exit.t
--- perl/lib/Test/Simple/t/exit.t.~1~ Wed Jun 27 16:00:12 2001
+++ perl/lib/Test/Simple/t/exit.t Wed Jun 27 16:00:12 2001
@@ -5,10 +5,12 @@
# 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 @@
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" );
}
==== //depot/perl/lib/Test/Simple/t/extra.t#2 (text) ====
Index: perl/lib/Test/Simple/t/extra.t
--- perl/lib/Test/Simple/t/extra.t.~1~ Wed Jun 27 16:00:12 2001
+++ perl/lib/Test/Simple/t/extra.t Wed Jun 27 16:00:12 2001
@@ -7,10 +7,12 @@
# 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 @@
require Test::Simple;
-push @INC, 'lib/Test/Simple';
+push @INC, 't', '.';
require Catch;
my($out, $err) = Catch::caught();
@@ -42,8 +44,8 @@
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
==== //depot/perl/lib/Test/Simple/t/fail.t#2 (text) ====
Index: perl/lib/Test/Simple/t/fail.t
--- perl/lib/Test/Simple/t/fail.t.~1~ Wed Jun 27 16:00:12 2001
+++ perl/lib/Test/Simple/t/fail.t Wed Jun 27 16:00:12 2001
@@ -9,10 +9,12 @@
# 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 @@
require Test::Simple;
-push @INC, 'lib/Test/Simple/';
+push @INC, 't', '.';
require Catch;
my($out, $err) = Catch::caught();
@@ -45,8 +47,8 @@
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
==== //depot/perl/lib/Test/Simple/t/missing.t#2 (text) ====
Index: perl/lib/Test/Simple/t/missing.t
--- perl/lib/Test/Simple/t/missing.t.~1~ Wed Jun 27 16:00:12 2001
+++ perl/lib/Test/Simple/t/missing.t Wed Jun 27 16:00:12 2001
@@ -7,10 +7,12 @@
# 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 @@
require Test::Simple;
-push @INC, 'lib/Test/Simple/';
+push @INC, 't', '.';
require Catch;
my($out, $err) = Catch::caught();
@@ -36,7 +38,7 @@
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
==== //depot/perl/lib/Test/Simple/t/no_plan.t#2 (text) ====
Index: perl/lib/Test/Simple/t/no_plan.t
--- perl/lib/Test/Simple/t/no_plan.t.~1~ Wed Jun 27 16:00:12 2001
+++ perl/lib/Test/Simple/t/no_plan.t Wed Jun 27 16:00:12 2001
@@ -7,10 +7,12 @@
# 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 @@
require Test::Simple;
-push @INC, 'lib/Test/Simple/';
+push @INC, 't', '.';
require Catch;
my($out, $err) = Catch::caught();
==== //depot/perl/lib/Test/Simple/t/plan_is_noplan.t#2 (text) ====
Index: perl/lib/Test/Simple/t/plan_is_noplan.t
--- perl/lib/Test/Simple/t/plan_is_noplan.t.~1~ Wed Jun 27 16:00:12 2001
+++ perl/lib/Test/Simple/t/plan_is_noplan.t Wed Jun 27 16:00:12 2001
@@ -16,10 +16,12 @@
# 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 @@
require Test::Simple;
-push @INC, 'lib/Test/Simple/';
+push @INC, 't', '.';
require Catch;
my($out, $err) = Catch::caught();
==== //depot/perl/lib/Test/Simple/Changes#1 (text) ====
Index: perl/lib/Test/Simple/Changes
--- perl/lib/Test/Simple/Changes.~1~ Wed Jun 27 16:00:12 2001
+++ perl/lib/Test/Simple/Changes Wed Jun 27 16:00:12 2001
@@ -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
+
End of Patch.