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