Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package perl-Test-Class for openSUSE:Factory
checked in at 2021-02-19 23:44:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Test-Class (Old)
and /work/SRC/openSUSE:Factory/.perl-Test-Class.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Test-Class"
Fri Feb 19 23:44:51 2021 rev:15 rq:873646 version:0.52
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Test-Class/perl-Test-Class.changes
2015-06-09 12:25:04.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Test-Class.new.28504/perl-Test-Class.changes
2021-02-19 23:45:36.755383820 +0100
@@ -1,0 +2,23 @@
+Thu Feb 18 03:08:19 UTC 2021 - Tina M??ller <[email protected]>
+
+- updated to 0.52
+ see /usr/share/doc/packages/perl-Test-Class/Changes
+
+ 0.52 [2021-02-17]
+ - Change bugtracker link to point GitHub issues instead of RT.
+ - Remove some old and broken links.
+ - Work by (Kaycie Goodman).
+ - Test fix (Pali, PR#32).
+ - Fix reporting caller information (file+line) when number of tests does
+ not match (Pali).
+ - Use better class names in t/runtests_return.t (Pali).
+ - Fix documentation to be more accurate regarding support and author
+ activity (Karen Etheridge).
+ - Ensure metadata is processed as v2 (Karen Etheridge).
+ - Remove unnecessary shebangs (Karen Etheridge).
+ - chmod ugo-x (Karen Etheridge).
+
+ 0.51 [2019-04-29]
+ - Create fail_if_returned_late (Jason Terry, Oaxlin, PR#23)
+
+-------------------------------------------------------------------
Old:
----
Test-Class-0.50.tar.gz
New:
----
Test-Class-0.52.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Test-Class.spec ++++++
--- /var/tmp/diff_new_pack.1kogpn/_old 2021-02-19 23:45:37.191384248 +0100
+++ /var/tmp/diff_new_pack.1kogpn/_new 2021-02-19 23:45:37.195384252 +0100
@@ -1,7 +1,7 @@
#
# spec file for package perl-Test-Class
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,22 +12,20 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
+%define cpan_name Test-Class
Name: perl-Test-Class
-Version: 0.50
+Version: 0.52
Release: 0
-%define cpan_name Test-Class
Summary: Easily create test classes in an xUnit/JUnit style
-License: Artistic-1.0 or GPL-1.0+
-Group: Development/Libraries/Perl
-Url: http://search.cpan.org/dist/Test-Class/
-Source0:
http://www.cpan.org/authors/id/E/ET/ETHER/%{cpan_name}-%{version}.tar.gz
+License: Artistic-1.0 OR GPL-1.0-or-later
+URL: https://metacpan.org/release/%{cpan_name}
+Source0:
https://cpan.metacpan.org/authors/id/S/SZ/SZABGAB/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
BuildArch: noarch
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(MRO::Compat) >= 0.11
@@ -48,26 +46,24 @@
Test::Class provides a simple way of creating classes and objects to test
your code in an xUnit style.
-Built using the Test::Builder manpage, it was designed to work with other
-Test::Builder based modules (the Test::More manpage, the Test::Differences
-manpage, the Test::Exception manpage, etc.).
+Built using Test::Builder, it was designed to work with other Test::Builder
+based modules (Test::More, Test::Differences, Test::Exception, etc.).
_Note:_ This module will make more sense, if you are already familiar with
-the "standard" mechanisms for testing perl code. Those unfamiliar with the
-Test::Harness manpage, the Test::Simple manpage, the Test::More manpage and
-friends should go take a look at them now. the Test::Tutorial manpage is a
-good starting point.
+the "standard" mechanisms for testing perl code. Those unfamiliar with
+Test::Harness, Test::Simple, Test::More and friends should go take a look
+at them now. Test::Tutorial is a good starting point.
%prep
-%setup -q -n %{cpan_name}-%{version}
-find . -type f -print0 | xargs -0 chmod 644
+%autosetup -n %{cpan_name}-%{version}
+find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path
"*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644
%build
-%{__perl} Makefile.PL INSTALLDIRS=vendor
-%{__make} %{?_smp_mflags}
+perl Makefile.PL INSTALLDIRS=vendor
+%make_build
%check
-%{__make} test
+make test
%install
%perl_make_install
@@ -75,7 +71,6 @@
%perl_gen_filelist
%files -f %{name}.files
-%defattr(-,root,root,755)
%doc Changes README
%changelog
++++++ Test-Class-0.50.tar.gz -> Test-Class-0.52.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/Changes new/Test-Class-0.52/Changes
--- old/Test-Class-0.50/Changes 2015-06-07 02:07:24.000000000 +0200
+++ new/Test-Class-0.52/Changes 2021-02-17 16:38:41.000000000 +0100
@@ -1,5 +1,22 @@
Changes for Perl extension Test-Class
+0.52 [2021-02-17]
+ - Change bugtracker link to point GitHub issues instead of RT.
+ - Remove some old and broken links.
+ - Work by (Kaycie Goodman).
+ - Test fix (Pali, PR#32).
+ - Fix reporting caller information (file+line) when number of tests does
+ not match (Pali).
+ - Use better class names in t/runtests_return.t (Pali).
+ - Fix documentation to be more accurate regarding support and author
+ activity (Karen Etheridge).
+ - Ensure metadata is processed as v2 (Karen Etheridge).
+ - Remove unnecessary shebangs (Karen Etheridge).
+ - chmod ugo-x (Karen Etheridge).
+
+0.51 [2019-04-29]
+ - Create fail_if_returned_late (Jason Terry, Oaxlin, PR#23)
+
0.50 [2015-06-07]
- add links to Ovid's tutorial series on Test::Class (Tim Vroom, PR#19)
- add links to Test::Class::Most, Test::Class::Moose (Tim Vroom, PR#20)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/MANIFEST new/Test-Class-0.52/MANIFEST
--- old/Test-Class-0.50/MANIFEST 2015-06-07 02:07:59.000000000 +0200
+++ new/Test-Class-0.52/MANIFEST 2021-02-17 16:39:26.000000000 +0100
@@ -3,9 +3,7 @@
lib/Test/Class/Load.pm
lib/Test/Class/MethodInfo.pm
Makefile.PL
-MANIFEST
-META.json
-META.yml
+MANIFEST This list of files
README
t/00-load.t
t/20-load-classes.t
@@ -81,3 +79,5 @@
xt/pmv.t
xt/pod.t
xt/spelling.t
+META.yml Module YAML meta-data (added by
MakeMaker)
+META.json Module JSON meta-data (added by
MakeMaker)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/META.json
new/Test-Class-0.52/META.json
--- old/Test-Class-0.50/META.json 2015-06-07 02:08:03.000000000 +0200
+++ new/Test-Class-0.52/META.json 2021-02-17 16:39:26.000000000 +0100
@@ -4,13 +4,13 @@
"Adrian Howard <[email protected]>, Curtis \"Ovid\" Poe, <ovid at
cpan.org>, Mark Morgan <[email protected]>"
],
"dynamic_config" : 1,
- "generated_by" : "ExtUtils::MakeMaker version 7.052, CPAN::Meta::Converter
version 2.150004",
+ "generated_by" : "ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter
version 2.150010",
"license" : [
"perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
- "version" : "2"
+ "version" : 2
},
"name" : "Test-Class",
"no_index" : {
@@ -20,9 +20,6 @@
]
},
"prereqs" : {
- "build" : {
- "requires" : {}
- },
"configure" : {
"requires" : {
"ExtUtils::MakeMaker" : "0"
@@ -62,16 +59,15 @@
"release_status" : "stable",
"resources" : {
"bugtracker" : {
- "mailto" : "[email protected]",
- "web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=Test-Class"
+ "web" : "https://github.com/szabgab/test-class/issues"
},
"repository" : {
"type" : "git",
- "url" : "https://github.com/adrianh/test-class.git",
- "web" : "https://github.com/adrianh/test-class"
+ "url" : "https://github.com/szabgab/test-class.git",
+ "web" : "https://github.com/szabgab/test-class"
}
},
- "version" : "0.50",
+ "version" : "0.52",
"x_IRC" : "irc://irc.perl.org/#perl-qa",
"x_MailingList" : "http://lists.perl.org/list/perl-qa.html",
"x_contributors" : [
@@ -91,6 +87,5 @@
"Zefram <[email protected]>",
"Kent Fredric <[email protected]>"
],
- "x_serialization_backend" : "JSON::PP version 2.27300"
+ "x_serialization_backend" : "JSON::PP version 4.02"
}
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/META.yml new/Test-Class-0.52/META.yml
--- old/Test-Class-0.50/META.yml 2015-06-07 02:08:03.000000000 +0200
+++ new/Test-Class-0.52/META.yml 2021-02-17 16:39:26.000000000 +0100
@@ -13,7 +13,7 @@
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 7.052, CPAN::Meta::Converter
version 2.150004'
+generated_by: 'ExtUtils::MakeMaker version 7.34, CPAN::Meta::Converter version
2.150010'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -40,9 +40,9 @@
strict: '0'
warnings: '0'
resources:
- bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=Test-Class
- repository: https://github.com/adrianh/test-class.git
-version: '0.50'
+ bugtracker: https://github.com/szabgab/test-class/issues
+ repository: https://github.com/szabgab/test-class.git
+version: '0.52'
x_IRC: irc://irc.perl.org/#perl-qa
x_MailingList: http://lists.perl.org/list/perl-qa.html
x_contributors:
@@ -61,5 +61,4 @@
- 'Klaus S. Madsen <[email protected]>'
- 'Zefram <[email protected]>'
- 'Kent Fredric <[email protected]>'
-x_serialization_backend: 'CPAN::Meta::YAML version 0.016'
-
+x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/Makefile.PL
new/Test-Class-0.52/Makefile.PL
--- old/Test-Class-0.50/Makefile.PL 2015-06-07 01:58:40.000000000 +0200
+++ new/Test-Class-0.52/Makefile.PL 2021-02-17 16:37:28.000000000 +0100
@@ -18,13 +18,12 @@
dynamic_config => 1,
resources => {
repository => {
- url => 'https://github.com/adrianh/test-class.git',
- web => 'https://github.com/adrianh/test-class',
+ url => 'https://github.com/szabgab/test-class.git',
+ web => 'https://github.com/szabgab/test-class',
type => 'git',
},
bugtracker => {
- mailto => '[email protected]',
- web =>
'https://rt.cpan.org/Public/Dist/Display.html?Name=Test-Class',
+ web => 'https://github.com/szabgab/test-class/issues',
},
},
x_contributors => [ # manually added, from git shortlog -e -s -n
@@ -49,6 +48,7 @@
},
META_ADD => {
+ 'meta-spec' => { version => 2 },
prereqs => {
configure => {
requires => {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/README new/Test-Class-0.52/README
--- old/Test-Class-0.50/README 2015-06-07 01:47:11.000000000 +0200
+++ new/Test-Class-0.52/README 2021-02-17 16:35:31.000000000 +0100
@@ -2,7 +2,7 @@
Test::Class - Easily create test classes in an xUnit/JUnit style
VERSION
- version 0.50
+ version 0.51
SYNOPSIS
package Example::Test;
@@ -479,6 +479,21 @@
}
}
+RETURNING LATE
+ If a test method runs too many tests, by default the test plan succeeds.
+
+ However, if the class's "fail_if_returned_late" method returns true,
+ then the extra tests will trigger a failure. For example,
+
+ package MyClass;
+ use base 'Test::Class';
+ sub fail_if_returned_late { 1 }
+
+ sub oops : Tests(1) {
+ ok 1, "just a simple test";
+ ok 1, "just a simple test"; #oops I copied and pasted too many tests
+ }
+
SKIPPED TESTS
You can skip the rest of the tests in a method by returning from the
method before all the test have finished running (but see "Returning
@@ -1172,6 +1187,12 @@
returns true, then the missing tests fail, otherwise, they skip. See
"Returning Early" and "Skipped Tests".
+ fail_if_returned_late
+ Controls what happens if a method returns after running too many
+ tests. It is called with no arguments in boolean context; if it
+ returns true, then the extra tests trigger a failure test. See
+ "Returning Late" and "Skipped Tests".
+
HELP FOR CONFUSED JUNIT USERS
This section is for people who have used JUnit (or similar) and are
confused because they don't see the TestCase/Suite/Runner class
@@ -1287,35 +1308,18 @@
output test results in the format that Test::Harness expects, but
things like todo tests and skipping tests are not supported.
-BUGS
- None known at the time of writing.
+SUPPORT
+ Bugs may be submitted through GitHub issues
+ <https://github.com/szabgab/test-class/issues>
- If you find any bugs please let me know by e-mail at
- <[email protected]>, or report the problem with
- <http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Class>.
-
-COMMUNITY
- perl-qa
- If you are interested in testing using Perl I recommend you visit
- <http://qa.perl.org/> and join the excellent perl-qa mailing list. See
- <http://lists.perl.org/showlist.cgi?name=perl-qa> for details on how to
- subscribe.
-
- perlmonks
- You can find users of Test::Class, including the module author, on
- <http://www.perlmonks.org/>. Feel free to ask questions on Test::Class
- there.
-
- CPAN::Forum
- The CPAN Forum is a web forum for discussing Perl's CPAN modules. The
- Test::Class forum can be found at
- <http://www.cpanforum.com/dist/Test-Class>.
+ There is also an irc channel available for users of this distribution,
+ at "#perl-qa" on "irc.perl.org" <irc://irc.perl.org/#perl-qa>.
TO DO
If you think this module should do something that it doesn't (or does
something that it shouldn't) please let me know.
- You can see my current to do list at
+ You can see an old to do list at
<http://adrianh.tadalist.com/lists/public/4798>, with an RSS feed of
changes at <http://adrianh.tadalist.com/lists/feed_public/4798>.
@@ -1346,9 +1350,6 @@
Adrian Howard <[email protected]>, Curtis "Ovid" Poe, <ovid at
cpan.org>, Mark Morgan <[email protected]>.
- If you use this module, and can spare the time please let us know or
- rate it at <http://cpanratings.perl.org/rate/?distribution=Test-Class>.
-
SEE ALSO
Test::Class::Load
Simple way to load "Test::Class" classes automatically.
@@ -1362,9 +1363,6 @@
Moose and non-Moose code. It offers reporting, extensibility, test
inheritance, parallel testing and more.
- <http://del.icio.us/tag/Test::Class>
- Delicious links on Test::Class.
-
Perl Testing: A Developer's Notebook by Ian Langworth and chromatic
Chapter 8 covers using Test::Class.
@@ -1377,19 +1375,24 @@
Test::Class Tutorial series written by Curtis "Ovid" Poe
- * <http://www.modernperlbooks.com/mt/2009/03/organizing-test-suite
+ * Organizing Test Suites with Test::Class
+ <http://www.modernperlbooks.com/mt/2009/03/organizing-test-suite
s-with-testclass.html>
- * <http://www.modernperlbooks.com/mt/2009/03/reusing-test-code-wit
+ * Reusing Test Code with Test::Class
+ <http://www.modernperlbooks.com/mt/2009/03/reusing-test-code-wit
h-testclass.html>
- * <http://www.modernperlbooks.com/mt/2009/03/making-your-testing-l
+ * Making Your Testing Life Easier
+ <http://www.modernperlbooks.com/mt/2009/03/making-your-testing-l
ife-easier.html>
- * <http://www.modernperlbooks.com/mt/2009/03/using-test-control-me
+ * Using Test Control Methods with Test::Class
+ <http://www.modernperlbooks.com/mt/2009/03/using-test-control-me
thods-with-testclass.html>
- * <http://www.modernperlbooks.com/mt/2009/03/working-with-testclas
+ * Working with Test::Class Test Suites
+ <http://www.modernperlbooks.com/mt/2009/03/working-with-testclas
s-test-suites.html>
Test::Builder
@@ -1398,12 +1401,9 @@
Test::Simple & Test::More
Basic utilities for writing tests.
- <http://qa.perl.org/test-modules.html>
+ <https://qa.perl.org/test-modules.html>
Overview of some of the many testing modules available on CPAN.
- <http://del.icio.us/tag/perl+testing>
- Delicious links on perl testing.
-
Test::Object
Another approach to object oriented testing.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/lib/Test/Class/Load.pm
new/Test-Class-0.52/lib/Test/Class/Load.pm
--- old/Test-Class-0.50/lib/Test/Class/Load.pm 2015-06-07 01:04:18.000000000
+0200
+++ new/Test-Class-0.52/lib/Test/Class/Load.pm 2021-02-17 16:25:13.000000000
+0100
@@ -8,7 +8,7 @@
use File::Spec;
use Module::Runtime 'require_module';
-our $VERSION = '0.50';
+our $VERSION = '0.52';
# Override to get your own filter
sub is_test_class {
@@ -69,7 +69,7 @@
=head1 VERSION
-version 0.50
+version 0.51
=head1 SYNOPSIS
@@ -213,13 +213,13 @@
my ($package) = $_package =~ /^([[:word:]]+(?:::[[:word:]]+)*)$/;
-=head1 AUTHOR
+=head1 SUPPORT
-Curtis "Ovid" Poe, C<< <[email protected]> >>
+See L<Test::Class>
-=head1 BUGS
+=head1 AUTHOR
-Please report any bugs or feature requests to
C<[email protected]>, or through the web interface at
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-Class-Load>. I will be
notified, and then you'll automatically be notified of progress on your bug as
I make changes.
+Curtis "Ovid" Poe, C<< <[email protected]> >>
=head1 ACKNOWLEDGMENTS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/lib/Test/Class/MethodInfo.pm
new/Test-Class-0.52/lib/Test/Class/MethodInfo.pm
--- old/Test-Class-0.50/lib/Test/Class/MethodInfo.pm 2015-06-07
01:04:18.000000000 +0200
+++ new/Test-Class-0.52/lib/Test/Class/MethodInfo.pm 2021-02-17
16:26:07.000000000 +0100
@@ -4,7 +4,7 @@
package Test::Class::MethodInfo;
use Carp;
-our $VERSION = '0.50';
+our $VERSION = '0.52';
sub new {
my ( $class, %param ) = @_;
@@ -57,7 +57,7 @@
=head1 VERSION
-version 0.50
+version 0.51
=head1 SYNOPSIS
@@ -88,18 +88,6 @@
=back
-=head1 BUGS
-
-None known at the time of writing. Apart from the fact this seems a bit gnarly
so I'm likely to tidy it up at some point.
-
-If you find any please let me know by e-mail, or report the problem with
L<http://rt.cpan.org/>.
-
-=head1 TO DO
-
-If you think this module should do something that it doesn't (or does
something that it shouldn't) please let me know.
-
-You can see my current to do list at
L<http://adrianh.tadalist.com/lists/public/15423>, with an RSS feed of changes
at L<http://adrianh.tadalist.com/lists/feed_public/15423>.
-
=head1 AUTHOR
Adrian Howard <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/lib/Test/Class.pm
new/Test-Class-0.52/lib/Test/Class.pm
--- old/Test-Class-0.50/lib/Test/Class.pm 2015-06-07 01:04:18.000000000
+0200
+++ new/Test-Class-0.52/lib/Test/Class.pm 2021-02-17 16:25:03.000000000
+0100
@@ -12,7 +12,7 @@
use Test::Class::MethodInfo;
use Try::Tiny;
-our $VERSION = '0.50';
+our $VERSION = '0.52';
my $Check_block_has_run;
{
@@ -300,8 +300,13 @@
_exception_failure($self, $method, $exception, $tests)
if $exception;
} elsif ($num_done > $num_expected) {
+ local $Test::Builder::Level = $Test::Builder::Level+1;
my $class = ref $self;
- $Builder->diag("expected $num_expected test(s) in $class\::$method,
$num_done completed\n");
+ if ($self->fail_if_returned_late) {
+ $Builder->ok(0, "expected $num_expected test(s) in
$class\::$method, $num_done completed");
+ } else {
+ $Builder->diag("expected $num_expected test(s) in
$class\::$method, $num_done completed\n");
+ }
} else {
until (($Builder->current_test - $num_start) >= $num_expected) {
if ($exception) {
@@ -309,6 +314,7 @@
$skip_reason = "$method died";
$exception = '';
} else {
+ local $Test::Builder::Level = $Test::Builder::Level+1;
if ($self->fail_if_returned_early) {
my $class = ref $self;
$Builder->ok(0, "($class\::$method returned before plan
complete)");
@@ -322,6 +328,7 @@
}
sub fail_if_returned_early { 0 }
+sub fail_if_returned_late { 0 }
sub _show_header {
my ($self, @tests) = @_;
@@ -486,7 +493,7 @@
=head1 VERSION
-version 0.50
+version 0.51
=head1 SYNOPSIS
@@ -946,6 +953,22 @@
}
+=head1 RETURNING LATE
+
+If a test method runs too many tests, by default the test plan succeeds.
+
+However, if the class's C<fail_if_returned_late> method returns true, then the
extra tests will trigger a failure. For example,
+
+ package MyClass;
+ use base 'Test::Class';
+ sub fail_if_returned_late { 1 }
+
+ sub oops : Tests(1) {
+ ok 1, "just a simple test";
+ ok 1, "just a simple test"; #oops I copied and pasted too many tests
+ }
+
+
=head1 SKIPPED TESTS
You can skip the rest of the tests in a method by returning from the method
before all the test have finished running (but see L<"Returning Early"> for how
to change this). The value returned is used as the reason for the tests being
skipped.
@@ -1576,6 +1599,10 @@
Controls what happens if a method returns before it has run all of its tests.
It is called with no arguments in boolean context; if it returns true, then the
missing tests fail, otherwise, they skip. See L<"Returning Early"> and
L<"Skipped Tests">.
+=item B<fail_if_returned_late>
+
+Controls what happens if a method returns after running too many tests. It is
called with no arguments in boolean context; if it returns true, then the extra
tests trigger a failure test. See L<"Returning Late"> and L<"Skipped Tests">.
+
=back
@@ -1668,34 +1695,18 @@
=back
+=head1 SUPPORT
-=head1 BUGS
-
-None known at the time of writing.
-
-If you find any bugs please let me know by e-mail at <[email protected]>,
or report the problem with
L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-Class>.
-
-
-=head1 COMMUNITY
-
-=head2 perl-qa
-
-If you are interested in testing using Perl I recommend you visit
L<http://qa.perl.org/> and join the excellent perl-qa mailing list. See
L<http://lists.perl.org/showlist.cgi?name=perl-qa> for details on how to
subscribe.
-
-=head2 perlmonks
-
-You can find users of Test::Class, including the module author, on
L<http://www.perlmonks.org/>. Feel free to ask questions on Test::Class there.
-
-=head2 CPAN::Forum
-
-The CPAN Forum is a web forum for discussing Perl's CPAN modules. The
Test::Class forum can be found at L<http://www.cpanforum.com/dist/Test-Class>.
+Bugs may be submitted through L<GitHub
issues|https://github.com/szabgab/test-class/issues>
+There is also an irc channel available for users of this distribution, at
+L<C<#perl-qa> on C<irc.perl.org>|irc://irc.perl.org/#perl-qa>.
=head1 TO DO
If you think this module should do something that it doesn't (or does
something that it shouldn't) please let me know.
-You can see my current to do list at
L<http://adrianh.tadalist.com/lists/public/4798>, with an RSS feed of changes
at L<http://adrianh.tadalist.com/lists/feed_public/4798>.
+You can see an old to do list at
L<http://adrianh.tadalist.com/lists/public/4798>, with an RSS feed of changes
at L<http://adrianh.tadalist.com/lists/feed_public/4798>.
=head1 ACKNOWLEDGMENTS
@@ -1770,8 +1781,6 @@
Adrian Howard <[email protected]>, Curtis "Ovid" Poe, <ovid at cpan.org>,
Mark Morgan <[email protected]>.
-If you use this module, and can spare the time please let us know or rate it
at L<http://cpanratings.perl.org/rate/?distribution=Test-Class>.
-
=head1 SEE ALSO
=over 4
@@ -1788,10 +1797,6 @@
Testing framework allows you to write your tests in Moose and test Moose and
non-Moose code. It offers reporting, extensibility, test inheritance, parallel
testing and more.
-=item L<http://del.icio.us/tag/Test::Class>
-
-Delicious links on Test::Class.
-
=item Perl Testing: A Developer's Notebook by Ian Langworth and chromatic
Chapter 8 covers using Test::Class.
@@ -1808,15 +1813,15 @@
=over 4
-=item *
L<http://www.modernperlbooks.com/mt/2009/03/organizing-test-suites-with-testclass.html>
+=item * L<Organizing Test Suites with
Test::Class|http://www.modernperlbooks.com/mt/2009/03/organizing-test-suites-with-testclass.html>
-=item *
L<http://www.modernperlbooks.com/mt/2009/03/reusing-test-code-with-testclass.html>
+=item * L<Reusing Test Code with
Test::Class|http://www.modernperlbooks.com/mt/2009/03/reusing-test-code-with-testclass.html>
-=item *
L<http://www.modernperlbooks.com/mt/2009/03/making-your-testing-life-easier.html>
+=item * L<Making Your Testing Life
Easier|http://www.modernperlbooks.com/mt/2009/03/making-your-testing-life-easier.html>
-=item *
L<http://www.modernperlbooks.com/mt/2009/03/using-test-control-methods-with-testclass.html>
+=item * L<Using Test Control Methods with
Test::Class|http://www.modernperlbooks.com/mt/2009/03/using-test-control-methods-with-testclass.html>
-=item *
L<http://www.modernperlbooks.com/mt/2009/03/working-with-testclass-test-suites.html>
+=item * L<Working with Test::Class Test
Suites|http://www.modernperlbooks.com/mt/2009/03/working-with-testclass-test-suites.html>
=back
@@ -1828,14 +1833,10 @@
Basic utilities for writing tests.
-=item L<http://qa.perl.org/test-modules.html>
+=item L<https://qa.perl.org/test-modules.html>
Overview of some of the many testing modules available on CPAN.
-=item L<http://del.icio.us/tag/perl+testing>
-
-Delicious links on perl testing.
-
=item L<Test::Object>
Another approach to object oriented testing.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/t/20-load-classes.t
new/Test-Class-0.52/t/20-load-classes.t
--- old/Test-Class-0.50/t/20-load-classes.t 2014-11-18 16:29:57.000000000
+0100
+++ new/Test-Class-0.52/t/20-load-classes.t 2021-02-17 15:28:10.000000000
+0100
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
use strict;
use warnings;
use Test::More tests => 14;
@@ -40,4 +38,4 @@
'... and their methods should also work correctly';
eval "use Test::Class::Load qw( t/test-libs/fail )";
-ok $@, "Trying to load a bad module fails";
\ No newline at end of file
+ok $@, "Trying to load a bad module fails";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/t/21-load-subclassed.t
new/Test-Class-0.52/t/21-load-subclassed.t
--- old/Test-Class-0.50/t/21-load-subclassed.t 2014-11-18 16:29:57.000000000
+0100
+++ new/Test-Class-0.52/t/21-load-subclassed.t 2021-02-17 15:28:10.000000000
+0100
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
use strict;
use warnings;
use Test::More tests => 7;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/t/Tests.t
new/Test-Class-0.52/t/Tests.t
--- old/Test-Class-0.50/t/Tests.t 2014-11-18 16:29:57.000000000 +0100
+++ new/Test-Class-0.52/t/Tests.t 2021-02-17 15:28:10.000000000 +0100
@@ -1,5 +1,3 @@
-#! /usr/bin/perl
-
use strict;
use warnings;
use Test::More tests => 2;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/t/bad-autoloads.t
new/Test-Class-0.52/t/bad-autoloads.t
--- old/Test-Class-0.50/t/bad-autoloads.t 2014-11-18 16:29:57.000000000
+0100
+++ new/Test-Class-0.52/t/bad-autoloads.t 2021-02-17 15:28:10.000000000
+0100
@@ -1,5 +1,3 @@
-#! /usr/bin/perl
-
use strict;
use warnings FATAL => 'all';
use Test::More;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/t/die-in-setup.t
new/Test-Class-0.52/t/die-in-setup.t
--- old/Test-Class-0.50/t/die-in-setup.t 2014-11-18 16:29:57.000000000
+0100
+++ new/Test-Class-0.52/t/die-in-setup.t 2021-02-17 15:28:10.000000000
+0100
@@ -1,5 +1,3 @@
-#! /usr/bin/perl
-
use strict;
use warnings;
@@ -21,7 +19,7 @@
$ENV{TEST_VERBOSE}=0;
test_out( "not ok 1 - setup_method (for test method 'test') died (oops - we
died)" );
test_err( "# Failed test 'setup_method (for test method 'test') died (oops -
we died)'" );
-test_err( "# at $0 line 27." );
+test_err( "# at $0 line 25." );
test_err( "# (in Foo->setup_method)" );
test_out("ok 2 # skip setup_method died");
Test::Class->runtests;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/t/filter.t
new/Test-Class-0.52/t/filter.t
--- old/Test-Class-0.50/t/filter.t 2014-11-18 16:29:57.000000000 +0100
+++ new/Test-Class-0.52/t/filter.t 2021-02-17 15:28:10.000000000 +0100
@@ -1,5 +1,3 @@
-#! /usr/bin/perl
-
use strict;
use warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/t/filter_bad_filter.t
new/Test-Class-0.52/t/filter_bad_filter.t
--- old/Test-Class-0.50/t/filter_bad_filter.t 2014-11-18 16:29:57.000000000
+0100
+++ new/Test-Class-0.52/t/filter_bad_filter.t 2021-02-17 15:28:10.000000000
+0100
@@ -1,5 +1,3 @@
-#! /usr/bin/perl
-
use strict;
use warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/t/filter_fixtures.t
new/Test-Class-0.52/t/filter_fixtures.t
--- old/Test-Class-0.50/t/filter_fixtures.t 2014-11-18 16:29:57.000000000
+0100
+++ new/Test-Class-0.52/t/filter_fixtures.t 2021-02-17 15:28:10.000000000
+0100
@@ -1,5 +1,3 @@
-#! /usr/bin/perl
-
use strict;
use warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/t/filter_fixtures_only.t
new/Test-Class-0.52/t/filter_fixtures_only.t
--- old/Test-Class-0.50/t/filter_fixtures_only.t 2015-06-06
23:56:34.000000000 +0200
+++ new/Test-Class-0.52/t/filter_fixtures_only.t 2021-02-17
15:28:10.000000000 +0100
@@ -1,5 +1,3 @@
-#! /usr/bin/perl
-
use strict;
use warnings;
use Test::More tests => 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/t/filter_multiple.t
new/Test-Class-0.52/t/filter_multiple.t
--- old/Test-Class-0.50/t/filter_multiple.t 2014-11-18 16:29:57.000000000
+0100
+++ new/Test-Class-0.52/t/filter_multiple.t 2021-02-17 15:28:10.000000000
+0100
@@ -1,5 +1,3 @@
-#! /usr/bin/perl
-
use strict;
use warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/t/methodinfo.t
new/Test-Class-0.52/t/methodinfo.t
--- old/Test-Class-0.50/t/methodinfo.t 2014-11-18 16:29:57.000000000 +0100
+++ new/Test-Class-0.52/t/methodinfo.t 2021-02-17 15:28:10.000000000 +0100
@@ -1,5 +1,3 @@
-#! /usr/bin/perl
-
use strict;
use warnings;
use Test::More 'no_plan';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/t/override.t
new/Test-Class-0.52/t/override.t
--- old/Test-Class-0.50/t/override.t 2015-06-07 00:36:43.000000000 +0200
+++ new/Test-Class-0.52/t/override.t 2021-02-17 15:28:10.000000000 +0100
@@ -1,5 +1,3 @@
-#! /usr/bin/perl
-
use strict;
use warnings;
use Test::More tests => 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/t/rt15870.t
new/Test-Class-0.52/t/rt15870.t
--- old/Test-Class-0.50/t/rt15870.t 2014-11-18 16:29:57.000000000 +0100
+++ new/Test-Class-0.52/t/rt15870.t 2021-02-17 15:28:10.000000000 +0100
@@ -1,5 +1,3 @@
-#! /usr/bin/perl
-
use strict;
use warnings;
use Test::Exception tests => 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/t/rt17264.t
new/Test-Class-0.52/t/rt17264.t
--- old/Test-Class-0.50/t/rt17264.t 2015-06-07 00:36:43.000000000 +0200
+++ new/Test-Class-0.52/t/rt17264.t 2021-02-17 15:28:10.000000000 +0100
@@ -1,5 +1,3 @@
-#! /usr/bin/perl
-
use strict;
use warnings;
use Test::Exception tests => 1;
@@ -8,4 +6,4 @@
require 'Test/Class.pm';
throws_ok { Test::Class->runtests } qr/Test::Class was loaded too late/,
- 'we figured out that we loaded Test::Class too late';
\ No newline at end of file
+ 'we figured out that we loaded Test::Class too late';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/t/runtests_return.t
new/Test-Class-0.52/t/runtests_return.t
--- old/Test-Class-0.50/t/runtests_return.t 2014-11-18 16:29:57.000000000
+0100
+++ new/Test-Class-0.52/t/runtests_return.t 2021-02-17 15:28:10.000000000
+0100
@@ -4,7 +4,7 @@
use warnings;
$ENV{TEST_VERBOSE}=0;
-package Foo;
+package SkipMissingTests;
use Test::More;
use base qw(Test::Class);
@@ -14,7 +14,7 @@
ok(-r "/Library", "/Library readable");
}
-package Bar;
+package FailMissingTests;
use Test::More;
use base qw(Test::Class);
@@ -26,18 +26,116 @@
ok(-w "/Library", "/Library writable");
}
+package AllowMoreTests;
+use Test::More;
+use base qw(Test::Class);
+
+sub more_tests : Tests(1) {
+ pass;
+ pass;
+}
+
+sub other_tests : Tests {
+ pass;
+}
+
+package DisallowMoreTests;
+use Test::More;
+use base qw(Test::Class);
+
+sub fail_if_returned_late { 1 }
+
+sub more_tests : Tests(1) {
+ pass;
+ pass;
+}
+
+sub other_tests : Tests {
+ pass;
+}
+
+package AllowMoreAndLessTests;
+use Test::More;
+use base qw(Test::Class);
+
+sub more_tests : Tests(1) {
+ pass;
+ pass;
+}
+
+sub less_tests : Tests(2) {
+ pass;
+}
+
+sub other_tests : Tests {
+ pass;
+}
+
+package DisallowMoreAndLessTests;
+use Test::More;
+use base qw(Test::Class);
+
+sub fail_if_returned_early { 1 }
+sub fail_if_returned_late { 1 }
+
+sub more_tests : Tests(1) {
+ pass;
+ pass;
+}
+
+sub less_tests : Tests(2) {
+ pass;
+}
+
+sub other_tests : Tests {
+ pass;
+}
+
package main;
-use Test::Builder::Tester tests => 2;
+use Test::Builder::Tester tests => 6;
test_out("ok 1 # skip darwin only test");
test_out("ok 2 # skip darwin only test");
-Foo->runtests;
+SkipMissingTests->runtests;
test_test("early return handled (skip)");
-test_out("not ok 1 - (Bar::darwin_only returned before plan complete)");
-test_out("not ok 2 - (Bar::darwin_only returned before plan complete)");
-test_err(qr/.*in Bar->darwin_only.*/s);
-Bar->runtests;
+test_out("not ok 1 - (FailMissingTests::darwin_only returned before plan
complete)");
+test_out("not ok 2 - (FailMissingTests::darwin_only returned before plan
complete)");
+test_err(qr/.* at \Q$0\E line .*in FailMissingTests->darwin_only.*/s);
+FailMissingTests->runtests;
test_test("early return handled (fail)");
+test_out("ok 1 - more tests");
+test_out("ok 2 - more tests");
+test_err("# expected 1 test(s) in AllowMoreTests::more_tests, 2 completed");
+test_out("ok 3 - other tests");
+AllowMoreTests->runtests;
+test_test("late return handled (skip)");
+
+test_out("ok 1 - more tests");
+test_out("ok 2 - more tests");
+test_out("not ok 3 - expected 1 test(s) in DisallowMoreTests::more_tests, 2
completed");
+test_err(qr/.* at \Q$0\E line .*in DisallowMoreTests->more_tests.*/s);
+test_out("ok 4 - other tests");
+DisallowMoreTests->runtests;
+test_test("late return handled (fail)");
+
+test_out("ok 1 - less tests");
+test_out("ok 2 # skip 1");
+test_out("ok 3 - more tests");
+test_out("ok 4 - more tests");
+test_err("# expected 1 test(s) in AllowMoreAndLessTests::more_tests, 2
completed");
+test_out("ok 5 - other tests");
+AllowMoreAndLessTests->runtests;
+test_test("early and late return handled (skip)");
+
+test_out("ok 1 - less tests");
+test_out("not ok 2 - (DisallowMoreAndLessTests::less_tests returned before
plan complete)");
+test_out("ok 3 - more tests");
+test_out("ok 4 - more tests");
+test_out("not ok 5 - expected 1 test(s) in
DisallowMoreAndLessTests::more_tests, 2 completed");
+test_out("ok 6 - other tests");
+test_err(qr/.* at \Q$0\E line .*in DisallowMoreAndLessTests->less_tests.* at
\Q$0\E line .*in DisallowMoreAndLessTests->more_tests.*/s);
+DisallowMoreAndLessTests->runtests;
+test_test("early and late return handled (fail)");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/t/skip1.t
new/Test-Class-0.52/t/skip1.t
--- old/Test-Class-0.50/t/skip1.t 2014-11-18 16:29:57.000000000 +0100
+++ new/Test-Class-0.52/t/skip1.t 2021-02-17 15:28:10.000000000 +0100
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
use strict;
use warnings;
use base qw(Test::Class);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/t/startup_that_dies.t
new/Test-Class-0.52/t/startup_that_dies.t
--- old/Test-Class-0.50/t/startup_that_dies.t 2014-11-18 16:29:57.000000000
+0100
+++ new/Test-Class-0.52/t/startup_that_dies.t 2021-02-17 15:28:10.000000000
+0100
@@ -1,5 +1,3 @@
-#! /usr/bin/perl
-
use strict;
use warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/t/teardown-when-test-dies.t
new/Test-Class-0.52/t/teardown-when-test-dies.t
--- old/Test-Class-0.50/t/teardown-when-test-dies.t 2014-11-18
16:29:57.000000000 +0100
+++ new/Test-Class-0.52/t/teardown-when-test-dies.t 2021-02-17
15:28:10.000000000 +0100
@@ -1,5 +1,3 @@
-#! /usr/bin/perl
-
use strict;
use warnings;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/t/test-libs/fail/MyFail.pm
new/Test-Class-0.52/t/test-libs/fail/MyFail.pm
--- old/Test-Class-0.50/t/test-libs/fail/MyFail.pm 2014-11-18
16:29:57.000000000 +0100
+++ new/Test-Class-0.52/t/test-libs/fail/MyFail.pm 2021-02-17
15:28:10.000000000 +0100
@@ -1,3 +1 @@
-#! /usr/bin/perl
-
-0; # we deliberately fail
\ No newline at end of file
+0; # we deliberately fail
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/t/test_deep.t
new/Test-Class-0.52/t/test_deep.t
--- old/Test-Class-0.50/t/test_deep.t 2014-11-18 16:29:57.000000000 +0100
+++ new/Test-Class-0.52/t/test_deep.t 2021-02-17 15:28:10.000000000 +0100
@@ -1,5 +1,3 @@
-#! /usr/bin/perl
-
use strict;
use warnings;
use Test::More tests => 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Class-0.50/t/test_method.t
new/Test-Class-0.52/t/test_method.t
--- old/Test-Class-0.50/t/test_method.t 2014-11-18 16:29:57.000000000 +0100
+++ new/Test-Class-0.52/t/test_method.t 2021-02-17 15:28:10.000000000 +0100
@@ -1,5 +1,3 @@
-#! /usr/bin/perl
-
use strict;
use warnings;
use Test::More tests => 4;