diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-27 17:11:28 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-27 17:11:28 +0000 |
commit | 1af51bd3b30471b0a2316001218c1740f0cf6584 (patch) | |
tree | 68435335b26ca88d07a4546fa13e3abdaca50764 /lib | |
parent | 9fecddabb6bed9c4b52a8bae2fa010809d568b0d (diff) | |
download | perl-1af51bd3b30471b0a2316001218c1740f0cf6584.tar.gz |
Upgrade to Test::More 0.07.
p4raw-id: //depot/perl@10992
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Test/More.pm | 14 | ||||
-rw-r--r-- | lib/Test/More/Changes | 32 | ||||
-rw-r--r-- | lib/Test/More/t/fail-like.t | 12 | ||||
-rw-r--r-- | lib/Test/More/t/fail.t | 29 | ||||
-rw-r--r-- | lib/Test/More/t/plan_is_noplan.t | 12 | ||||
-rw-r--r-- | lib/Test/More/t/skipall.t | 12 |
6 files changed, 74 insertions, 37 deletions
diff --git a/lib/Test/More.pm b/lib/Test/More.pm index da35d261bb..971e33ff19 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<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 index 0000000000..c09ffd91f0 --- /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 69d8574791..9bac0afb19 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 e33d529b62..d684e65f1b 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 = <<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 .* diff --git a/lib/Test/More/t/plan_is_noplan.t b/lib/Test/More/t/plan_is_noplan.t index 25319d8070..29ccd6b649 100644 --- a/lib/Test/More/t/plan_is_noplan.t +++ b/lib/Test/More/t/plan_is_noplan.t @@ -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(); diff --git a/lib/Test/More/t/skipall.t b/lib/Test/More/t/skipall.t index c0137ccba8..bfee83dbb3 100644 --- a/lib/Test/More/t/skipall.t +++ b/lib/Test/More/t/skipall.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(); |