- Add p5-Test-Warnings 0.008

If you've ever tried to use Test::NoWarnings to confirm there are no warnings
generated by your tests, combined with the convenience of done_testing to not
have to declare a test count, you'll have discovered that these two features do
not play well together, as the test count will be calculated before the warnings
test is run, resulting in a TAP error. (See examples/test_nowarnings.pl in this
distribution for a demonstration.)

This module is intended to be used as a drop-in replacement for
Test::NoWarnings: it also adds an extra test, but runs this test before
done_testing calculates the test count, rather than after. It does this by
hooking into done_testing as well as via an END block. You can declare a plan,
or not, and things will still Just Work.

WWW: http://search.cpan.org/dist/Test-Warnings/
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2013-09-08 15:46:36 +00:00
parent 1ce36abe41
commit 9308b19908
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=326749
5 changed files with 48 additions and 0 deletions

View file

@ -2862,6 +2862,7 @@
SUBDIR += p5-Test-WWW-Mechanize-PSGI
SUBDIR += p5-Test-WWW-Selenium
SUBDIR += p5-Test-Warn
SUBDIR += p5-Test-Warnings
SUBDIR += p5-Test-Weaken
SUBDIR += p5-Test-Without-Module
SUBDIR += p5-Test-XML

View file

@ -0,0 +1,26 @@
# Created by: Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
# $FreeBSD$
PORTNAME= Test-Warnings
PORTVERSION= 0.008
CATEGORIES= devel perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
MAINTAINER= sunpoet@FreeBSD.org
COMMENT= Test for warnings and the lack of them
LICENSE= ART10 GPLv1
LICENSE_COMB= dual
TEST_DEPENDS= p5-Capture-Tiny>=0:${PORTSDIR}/devel/p5-Capture-Tiny \
p5-Test-CheckDeps>=0.006:${PORTSDIR}/devel/p5-Test-CheckDeps \
p5-Test-Deep>=0:${PORTSDIR}/devel/p5-Test-Deep \
p5-Test-Tester>=0.108:${PORTSDIR}/devel/p5-Test-Tester
USE_PERL5= modbuildtiny
USES= perl5
MAN3= Test::Warnings.3
.include <bsd.port.mk>

View file

@ -0,0 +1,2 @@
SHA256 (Test-Warnings-0.008.tar.gz) = 119f2a279fe7d0681dcf4517f1bcb056e4596cfbae7b9ee447118f036cf089e4
SIZE (Test-Warnings-0.008.tar.gz) = 21853

View file

@ -0,0 +1,14 @@
If you've ever tried to use Test::NoWarnings to confirm there are no warnings
generated by your tests, combined with the convenience of done_testing to not
have to declare a test count, you'll have discovered that these two features do
not play well together, as the test count will be calculated before the warnings
test is run, resulting in a TAP error. (See examples/test_nowarnings.pl in this
distribution for a demonstration.)
This module is intended to be used as a drop-in replacement for
Test::NoWarnings: it also adds an extra test, but runs this test before
done_testing calculates the test count, rather than after. It does this by
hooking into done_testing as well as via an END block. You can declare a plan,
or not, and things will still Just Work.
WWW: http://search.cpan.org/dist/Test-Warnings/

View file

@ -0,0 +1,5 @@
%%SITE_PERL%%/Test/Warnings.pm
%%SITE_PERL%%/%%PERL_ARCH%%/auto/Test/Warnings/.packlist
@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/Test/Warnings
@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/Test
@dirrmtry %%SITE_PERL%%/Test