From: Jarkko Hietaniemi Date: Wed, 27 Jun 2001 17:11:28 +0000 (+0000) Subject: Upgrade to Test::More 0.07. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1af51bd3b30471b0a2316001218c1740f0cf6584;p=p5sagit%2Fp5-mst-13.2.git Upgrade to Test::More 0.07. p4raw-id: //depot/perl@10992 --- diff --git a/MANIFEST b/MANIFEST index 0cf83a8..6d31ecc 100644 --- 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 diff --git a/lib/Test/More.pm b/lib/Test/More.pm index da35d26..971e33f 100644 --- a/lib/Test/More.pm +++ b/lib/Test/More.pm @@ -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 * 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 index 0000000..c09ffd9 --- /dev/null +++ b/lib/Test/More/Changes @@ -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 + diff --git a/lib/Test/More/t/fail-like.t b/lib/Test/More/t/fail-like.t index 69d8574..9bac0af 100644 --- a/lib/Test/More/t/fail-like.t +++ b/lib/Test/More/t/fail-like.t @@ -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(); diff --git a/lib/Test/More/t/fail.t b/lib/Test/More/t/fail.t index e33d529..d684e65 100644 --- a/lib/Test/More/t/fail.t +++ b/lib/Test/More/t/fail.t @@ -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 = <