140dd48
Name:		perl-Test-Warnings
c952dab
Version:	0.021
147d1d4
Release:	1%{?dist}
140dd48
Summary:	Test for warnings and the lack of them
140dd48
License:	GPL+ or Artistic
140dd48
Group:		Development/Libraries
140dd48
URL:		http://search.cpan.org/dist/Test-Warnings
140dd48
Source0:	http://search.cpan.org/CPAN/authors/id/E/ET/ETHER/Test-Warnings-%{version}.tar.gz
140dd48
BuildArch:	noarch
140dd48
# Build
316eea4
BuildRequires:	perl
147d1d4
BuildRequires:	perl(ExtUtils::MakeMaker)
140dd48
# Module
147d1d4
BuildRequires:	perl(Carp)
140dd48
BuildRequires:	perl(Exporter)
140dd48
BuildRequires:	perl(Test::Builder)
140dd48
BuildRequires:	perl(parent)
140dd48
BuildRequires:	perl(strict)
140dd48
BuildRequires:	perl(warnings)
140dd48
# Test Suite
147d1d4
BuildRequires:	perl(CPAN::Meta) >= 2.120900
c952dab
BuildRequires:	perl(CPAN::Meta::Check) >= 0.007
147d1d4
BuildRequires:	perl(CPAN::Meta::Prereqs)
c952dab
BuildRequires:	perl(CPAN::Meta::Requirements)
3c29020
BuildRequires:	perl(ExtUtils::MakeMaker)
147d1d4
BuildRequires:	perl(File::Spec)
140dd48
BuildRequires:	perl(if)
140dd48
BuildRequires:	perl(Test::More) >= 0.94
140dd48
BuildRequires:	perl(Test::Tester) >= 0.108
140dd48
# Runtime
140dd48
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
147d1d4
Requires:	perl(Carp)
140dd48
140dd48
%description
140dd48
If you've ever tried to use Test::NoWarnings to confirm there are no warnings
140dd48
generated by your tests, combined with the convenience of done_testing to not
140dd48
have to declare a test count, you'll have discovered that these two features do
140dd48
not play well together, as the test count will be calculated before the
140dd48
warnings test is run, resulting in a TAP error (see examples/test_nowarnings.pl
140dd48
in this distribution for a demonstration).
140dd48
140dd48
This module is intended to be used as a drop-in replacement for
140dd48
Test::NoWarnings: it also adds an extra test, but runs this test before
140dd48
done_testing calculates the test count, rather than after. It does this by
140dd48
hooking into done_testing as well as via an END block. You can declare a plan,
140dd48
or not, and things will still Just Work.
140dd48
140dd48
It is actually equivalent to:
140dd48
140dd48
    use Test::NoWarnings 1.04 ':early';
140dd48
140dd48
as warnings are still printed normally as they occur. You are safe, and
140dd48
enthusiastically encouraged, to perform a global search-replace of the above
140dd48
with use Test::Warnings; whether or not your tests have a plan.
140dd48
140dd48
%prep
140dd48
%setup -q -n Test-Warnings-%{version}
140dd48
140dd48
%build
316eea4
perl Makefile.PL INSTALLDIRS=vendor
316eea4
make %{?_smp_mflags}
140dd48
140dd48
%install
316eea4
make pure_install DESTDIR=%{buildroot}
316eea4
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
316eea4
%{_fixperms} %{buildroot}
140dd48
140dd48
%check
316eea4
make test
140dd48
140dd48
%files
147d1d4
%license LICENSE
147d1d4
%doc Changes CONTRIBUTING README examples/
140dd48
%{perl_vendorlib}/Test/
147d1d4
%{_mandir}/man3/Test::Warnings.3*
140dd48
140dd48
%changelog
c952dab
* Mon Mar 23 2015 Paul Howarth <paul@city-fan.org> - 0.021-1
c952dab
- Update to 0.021
c952dab
  - Add a x_breaks entry for conflicting versions of File::pushd that
c952dab
    inadvertently call our exported warnings() rather than invoking
c952dab
    warnings.pm, and documented this undesired interaction
c952dab
0e5f252
* Wed Jan  7 2015 Paul Howarth <paul@city-fan.org> - 0.020-1
0e5f252
- Update to 0.020
0e5f252
  - Re-release to fix problematic $VERSION declaration (CPAN RT#101239)
0e5f252
2a0d4f3
* Fri Dec 19 2014 Paul Howarth <paul@city-fan.org> - 0.019-1
2a0d4f3
- Update to 0.019
2a0d4f3
  - Fix test to allow for special characters (e.g. MSWin32 file separators) in
2a0d4f3
    filenames (PR#7)
2a0d4f3
9dd538d
* Thu Dec 18 2014 Paul Howarth <paul@city-fan.org> - 0.018-1
9dd538d
- Update to 0.018
9dd538d
  - Fix test to not depend on message formatting changes in newer Carp
9dd538d
147d1d4
* Wed Dec 17 2014 Paul Howarth <paul@city-fan.org> - 0.017-1
147d1d4
- Update to 0.017
147d1d4
  - Handle other warning handlers passing us partial warning messages by
147d1d4
    re-adding the source file and line number
147d1d4
- Use %%license
147d1d4
0bbbfb7
* Wed Aug 27 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.016-2
0bbbfb7
- Perl 5.20 rebuild
0bbbfb7
aac436f
* Sun Jun 22 2014 Paul Howarth <paul@city-fan.org> - 0.016-1
aac436f
- Update to 0.16
aac436f
  - Fix prereq problem with last release - now no longer testing the example
aac436f
    scripts for user installs
aac436f
316eea4
* Fri Jun 20 2014 Paul Howarth <paul@city-fan.org> - 0.015-1
316eea4
- Update to 0.15
316eea4
  - Adjusted packaging and tests to become perl-5.6 friendly, including only
316eea4
    using core or dual-lifed prerequisites
316eea4
- Switch to ExtUtils::MakeMaker flow
316eea4
d9dbe2f
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.014-2
d9dbe2f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
d9dbe2f
68e7c0c
* Mon Mar  3 2014 Paul Howarth <paul@city-fan.org> - 0.014-1
68e7c0c
- Update to 0.014
68e7c0c
  - Fix test that fails when FOO or BAR environment variables are set
68e7c0c
    (CPAN RT#93447)
68e7c0c
9567334
* Mon Dec 16 2013 Paul Howarth <paul@city-fan.org> - 0.013-1
9567334
- Update to 0.013
9567334
  - Update configure_requires checking in Makefile.PL
9567334
69cb852
* Mon Oct 14 2013 Paul Howarth <paul@city-fan.org> - 0.012-1
69cb852
- Update to 0.012
69cb852
  - Re-release to fix t/00-report-prereqs.t use of CPAN::Meta::Requirements
69cb852
2da2a99
* Sun Oct 13 2013 Paul Howarth <paul@city-fan.org> - 0.011-1
2da2a99
- Update to 0.011
2da2a99
  - Unnecessary tests removed
2da2a99
  - CONTRIBUTING file added
2da2a99
- Drop buildreqs only needed for removed tests
2da2a99
- BR: optional test requirement perl(CPAN::Meta::Requirements)
2da2a99
3c29020
* Wed Sep 25 2013 Paul Howarth <paul@city-fan.org> - 0.010-1
3c29020
- Update to 0.010
3c29020
  - Re-release with fixed compile test
3c29020
- Update dependencies
3c29020
- Package examples
3c29020
49cd1ff
* Wed Sep 11 2013 Paul Howarth <paul@city-fan.org> - 0.009-1
49cd1ff
- Update to 0.009
49cd1ff
  - Fixed error in synopsis (we do not export anything by default)
49cd1ff
  - A caveat added to the documentation regarding embedding warning checks
49cd1ff
    inside another sub
49cd1ff
  - ':no_end_test' now also covers side effects of done_testing, as well as
49cd1ff
    END blocks, making it possible to use the warning(s) subs without having an
49cd1ff
    end warning test while using done_testing (necessary when combining with
49cd1ff
    the 'if' pragma)
49cd1ff
  - END tests will not be added by a subequent use of Test::Warnings if a
49cd1ff
    previous one passed ':no_end_test'
49cd1ff
- Update dependencies
49cd1ff
b25dc10
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.008-3
b25dc10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
b25dc10
4441ae3
* Wed Jul 24 2013 Petr Pisar <ppisar@redhat.com> - 0.008-2
4441ae3
- Perl 5.18 rebuild
4441ae3
cb57569
* Mon Jul 15 2013 Paul Howarth <paul@city-fan.org> - 0.008-1
cb57569
- Update to 0.008
cb57569
  - Compile test updated, to hopefully fix mswin32 parsing issues
cb57569
140dd48
* Wed Jul 10 2013 Paul Howarth <paul@city-fan.org> - 0.007-1
140dd48
- Update to 0.007
140dd48
  - Fix subtest tests to work on Test::More before 0.95_01 (CPAN RT#86802)
140dd48
- BR: perl(Capture::Tiny)
140dd48
- Bump perl(Module::Build::Tiny) version requirement to 0.024
140dd48
- Bump perl(Test::CheckDeps) version requirement to 0.006
140dd48
- Drop perl(Test::More) version requirement to 0.94
140dd48
140dd48
* Tue Jul  9 2013 Paul Howarth <paul@city-fan.org> - 0.006-2
140dd48
- Sanitize for Fedora submission
140dd48
140dd48
* Tue Jul  9 2013 Paul Howarth <paul@city-fan.org> - 0.006-1
140dd48
- Initial RPM version