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
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
=cut
-sub skip (&$$;$) {
- my($tests, $how_many, $why, $if) = @_;
-
- if( $if ) {
-
- }
+sub skip {
+ die "skip() is UNIMPLEMENTED!";
}
=item B<todo> * UNIMPLEMENTED *
=cut
-sub todo (&$$;$) {
- my($tests, $how_many, $name, $if) = @_;
+sub todo {
+ die "todo() is UNIMPLEMENTED!";
}
=head2 Comparision functions
--- /dev/null
+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
+
# 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++;
}
package main;
require Test::More;
-push @INC, 'lib/Test/More/';
+push @INC, 't', '.';
require Catch;
my($out, $err) = Catch::caught();
# 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++;
}
package main;
require Test::More;
-push @INC, 'lib/Test/More/';
+push @INC, 't', '.';
require Catch;
my($out, $err) = Catch::caught();
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 .*
# 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++;
}
require Test::More;
-push @INC, 'lib/Test/More/';
+push @INC, 't', '.';
require Catch;
my($out, $err) = Catch::caught();
# 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++;
}
package main;
require Test::More;
-push @INC, 'lib/Test/More/';
+push @INC, 't', '.';
require Catch;
my($out, $err) = Catch::caught();