diff options
Diffstat (limited to 'Master/tlpkg/tlperl/lib/Test/Builder/Tester.pm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/Test/Builder/Tester.pm | 48 |
1 files changed, 28 insertions, 20 deletions
diff --git a/Master/tlpkg/tlperl/lib/Test/Builder/Tester.pm b/Master/tlpkg/tlperl/lib/Test/Builder/Tester.pm index 49a42cead16..b0554b89aca 100644 --- a/Master/tlpkg/tlperl/lib/Test/Builder/Tester.pm +++ b/Master/tlpkg/tlperl/lib/Test/Builder/Tester.pm @@ -1,9 +1,9 @@ package Test::Builder::Tester; use strict; -our $VERSION = "1.23_002"; +our $VERSION = "1.28"; -use Test::Builder 0.98; +use Test::Builder 0.99; use Symbol; use Carp; @@ -25,20 +25,20 @@ Test::Builder =head1 DESCRIPTION A module that helps you test testing modules that are built with -B<Test::Builder>. +L<Test::Builder>. The testing system is designed to be used by performing a three step process for each test you wish to test. This process starts with using C<test_out> and C<test_err> in advance to declare what the testsuite you -are testing will output with B<Test::Builder> to stdout and stderr. +are testing will output with L<Test::Builder> to stdout and stderr. You then can run the test(s) from your test suite that call -B<Test::Builder>. At this point the output of B<Test::Builder> is -safely captured by B<Test::Builder::Tester> rather than being +L<Test::Builder>. At this point the output of L<Test::Builder> is +safely captured by L<Test::Builder::Tester> rather than being interpreted as real test output. The final stage is to call C<test_test> that will simply compare what you -predeclared to what B<Test::Builder> actually outputted, and report the +predeclared to what L<Test::Builder> actually outputted, and report the results back with a "ok" or "not ok" (with debugging) to the normal output. @@ -165,8 +165,8 @@ which is even the same as test_out("ok 2"); Once C<test_out> or C<test_err> (or C<test_fail> or C<test_diag>) have -been called, all further output from B<Test::Builder> will be -captured by B<Test::Builder::Tester>. This means that you will not +been called, all further output from L<Test::Builder> will be +captured by L<Test::Builder::Tester>. This means that you will not be able perform further tests to the normal output in the normal way until you call C<test_test> (well, unless you manually meddle with the output filehandles) @@ -189,7 +189,7 @@ sub test_err { =item test_fail -Because the standard failure message that B<Test::Builder> produces +Because the standard failure message that L<Test::Builder> produces whenever a test fails will be a common occurrence in your test error output, and because it has changed between Test::Builder versions, rather than forcing you to call C<test_err> with the string all the time like @@ -228,7 +228,7 @@ sub test_fail { =item test_diag As most of the remaining expected output to the error stream will be -created by Test::Builder's C<diag> function, B<Test::Builder::Tester> +created by L<Test::Builder>'s C<diag> function, L<Test::Builder::Tester> provides a convenience function C<test_diag> that you can use instead of C<test_err>. @@ -242,7 +242,7 @@ you can write test_diag("Couldn't open file"); -Remember that B<Test::Builder>'s diag function will not add newlines to +Remember that L<Test::Builder>'s diag function will not add newlines to the end of output and test_diag will. So to check Test::Builder->new->diag("foo\n","bar\n"); @@ -267,7 +267,7 @@ sub test_diag { =item test_test Actually performs the output check testing the tests, comparing the -data (with C<eq>) that we have captured from B<Test::Builder> against +data (with C<eq>) that we have captured from L<Test::Builder> against what was declared with C<test_out> and C<test_err>. This takes name/value pairs that effect how the test is run. @@ -297,9 +297,9 @@ As a convenience, if only one argument is passed then this argument is assumed to be the name of the test (as in the above examples.) Once C<test_test> has been run test output will be redirected back to -the original filehandles that B<Test::Builder> was connected to +the original filehandles that L<Test::Builder> was connected to (probably STDOUT and STDERR,) meaning any further tests you run -will function normally and cause success/errors for B<Test::Harness>. +will function normally and cause success/errors for L<Test::Harness>. =cut @@ -400,11 +400,11 @@ respectively, and the function called with no argument will return the current setting. To enable colouring from the command line, you can use the -B<Text::Builder::Tester::Color> module like so: +L<Text::Builder::Tester::Color> module like so: perl -Mlib=Text::Builder::Tester::Color test.t -Or by including the B<Test::Builder::Tester::Color> module directly in +Or by including the L<Test::Builder::Tester::Color> module directly in the PERL5LIB. =cut @@ -420,12 +420,12 @@ sub color { =head1 BUGS -Calls C<<Test::Builder->no_ending>> turning off the ending tests. +Calls C<< Test::Builder->no_ending >> turning off the ending tests. This is needed as otherwise it will trip out because we've run more tests than we strictly should have and it'll register any failures we had that we were testing for as real failures. -The color function doesn't work unless B<Term::ANSIColor> is +The color function doesn't work unless L<Term::ANSIColor> is compatible with your terminal. Bugs (and requests for new features) can be reported to the author @@ -436,7 +436,7 @@ L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Builder-Tester> Copyright Mark Fowler E<lt>mark@twoshortplanks.comE<gt> 2002, 2004. -Some code taken from B<Test::More> and B<Test::Catch>, written by +Some code taken from L<Test::More> and L<Test::Catch>, written by Michael G Schwern E<lt>schwern@pobox.comE<gt>. Hence, those parts Copyright Micheal G Schwern 2001. Used and distributed with permission. @@ -444,6 +444,14 @@ permission. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. +=head1 MAINTAINERS + +=over 4 + +=item Chad Granum E<lt>exodist@cpan.orgE<gt> + +=back + =head1 NOTES Thanks to Richard Clamp E<lt>richardc@unixbeard.netE<gt> for letting |