commit 1933bb6496212f5a887d5f41a2aeda42ed690940 Author: ultra_planet Date: Tue Dec 3 16:46:46 2019 +0800 package init diff --git a/Test-Warnings-0.026.tar.gz b/Test-Warnings-0.026.tar.gz new file mode 100644 index 0000000..217af9b Binary files /dev/null and b/Test-Warnings-0.026.tar.gz differ diff --git a/perl-Test-Warnings.spec b/perl-Test-Warnings.spec new file mode 100644 index 0000000..66576e4 --- /dev/null +++ b/perl-Test-Warnings.spec @@ -0,0 +1,66 @@ +Name: perl-Test-Warnings +Version: 0.026 +Release: 10 +Summary: Test for warnings and the lack of them +License: GPL+ or Artistic +URL: https://metacpan.org/release/Test-Warnings +Source0: https://cpan.metacpan.org/authors/id/E/ET/ETHER/Test-Warnings-%{version}.tar.gz + +BuildRequires: coreutils findutils make perl-interpreter perl-generators perl(ExtUtils::MakeMaker) perl(Carp) +BuildRequires: perl(Exporter) perl(Test::Builder) perl(parent) perl(strict) perl(warnings) perl(ExtUtils::MakeMaker) +BuildRequires: perl(File::Spec) perl(if) perl(lib) perl(Test::More) >= 0.94 perl(Test::Tester) >= 0.108 +BuildRequires: perl(CPAN::Meta) >= 2.120900 perl(CPAN::Meta::Check) >= 0.011 perl(CPAN::Meta::Prereqs) +BuildRequires: perl(CPAN::Meta::Requirements) perl(PadWalker) +Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) perl(Carp) +BuildArch: noarch + +%description +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. + +It is actually equivalent to: +use Test::NoWarnings 1.04 ':early'; + +as warnings are still printed normally as they occur. You are safe, and enthusiastically encouraged, to perform +a global search-replace of the above with use Test::Warnings; whether or not your tests have a plan. + +It can also be used as a replacement for Test::Warn, if you wish to test the content of expected warnings; read +on to find out how. + +%package help +Summary: Help package for %{name} + +%description help +This package contains some man help files for %{name}. + +%prep +%autosetup -n Test-Warnings-%{version} -p1 + +%build +perl Makefile.PL INSTALLDIRS=vendor +%make_build + +%install +make pure_install DESTDIR=%{buildroot} +%{_fixperms} %{buildroot} + +%check +make test + +%files +%doc Changes CONTRIBUTING LICENCE README examples/ +%{perl_vendorlib}/Test/ +%exclude %{perl_vendorarch}/auto/Test/Warnings/.packlist + +%files help +%{_mandir}/man3/Test::Warnings.3* + +%changelog +* Thu Nov 28 2019 lingsheng 0.026-10 +- Package init