revert screwup

This commit is contained in:
YellowJacketLinux 2023-04-23 18:22:08 -07:00
parent 85a1ba246b
commit dbf2294345

View File

@ -1,41 +1,52 @@
%global cpanname Test-FailWarnings %global cpanname Test-Warnings
%if %{?repo:1}%{!?repo:0}
%if "%{repo}" == "1.core."
%global norequiremetacheck foo
%global norequirepadwalker bar
%endif
%endif
Name: perl-%{cpanname} Name: perl-%{cpanname}
Version: 0.008 Version: 0.031
Release: %{?repo}0.rc2%{?dist} Release: %{?repo}0.rc2%{?dist}
Summary: Add test failures if warnings are caught Summary: Test for warnings and the lack of them
BuildArch: noarch BuildArch: noarch
Group: Development/Libraries Group: Development/Libraries
License: Apache-2.0 License: GPL-1.0-or-later or Artistic-1.0-Perl
URL: https://metacpan.org/pod/Test::FailWarnings URL: https://metacpan.org/pod/Test::Warnings
Source0: https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/%{cpanname}-%{version}.tar.gz Source0: https://cpan.metacpan.org/authors/id/E/ET/ETHER/%{cpanname}-%{version}.tar.gz
BuildRequires: perl-devel BuildRequires: perl-devel
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
# for test # for test
%if 0%{?runtests:1} == 1 %if 0%{?runtests:1} == 1
BuildRequires: perl(Test::More) >= 0.96 BuildRequires: perl(CPAN::Meta)
BuildRequires: perl(warnings) BuildRequires: perl(Test::More) >= 0.94
BuildRequires: perl(Capture::Tiny) >= 0.12 BuildRequires: perl(CPAN::Meta)
BuildRequires: perl(File::Spec) BuildRequires: perl(if)
BuildRequires: perl(File::Spec::Functions)
BuildRequires: perl(File::Temp)
BuildRequires: perl(IO::Handle)
BuildRequires: perl(IPC::Open3)
BuildRequires: perl(List::Util)
BuildRequires: perl(constant)
BuildRequires: perl(lib)
BuildRequires: perl(Carp) BuildRequires: perl(Carp)
BuildRequires: perl(Cwd) BuildRequires: perl(Exporter)
BuildRequires: perl(File::Spec) BuildRequires: perl(Test::Builder)
BuildRequires: perl(parent)
BuildRequires: perl(strict) BuildRequires: perl(strict)
BuildRequires: perl(warnings)
# suggests
%if 0%{!?norequiremetacheck:1} == 1
BuildRequires: perl(CPAN::Meta::Check) >= 0.011
%endif %endif
# Runtime BuildRequires: perl(CPAN::Meta::Requirements)
%if 0%{!?norequirepadwalker:1} == 1
BuildRequires: perl(PadWalker)
%endif
BuildRequires: perl(Test::Tester) >= 0.108
%endif
# runtime
Requires: perl(Carp) Requires: perl(Carp)
Requires: perl(Cwd) Requires: perl(Exporter)
Requires: perl(File::Spec) Requires: perl(Test::Builder)
Requires: perl(Test::More) >= 0.96 Requires: perl(parent)
Requires: perl(strict) Requires: perl(strict)
Requires: perl(warnings) Requires: perl(warnings)
%if 0%{?perl5_API:1} == 1 %if 0%{?perl5_API:1} == 1
@ -43,13 +54,18 @@ Requires: %{perl5_API}
%endif %endif
%description %description
This module hooks $SIG{__WARN__} and converts warnings to Test::More If you've ever tried to use Test::NoWarnings to confirm there are no
fail() calls. It is designed to be used with done_testing, when you warnings generated by your tests, combined with the convenience of
don't need to know the test count in advance. 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.
Just as with Test::NoWarnings, this does not catch warnings if other This module is intended to be used as a drop-in replacement for
things localize $SIG{__WARN__}, as this is designed to catch unhandled Test::NoWarnings: it also adds an extra test, but runs this test before
warnings. 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.
%prep %prep
%setup -n %{cpanname}-%{version} %setup -n %{cpanname}-%{version}
@ -73,18 +89,20 @@ make install DESTDIR=%{buildroot}
%files %files
%defattr(-,root,root,-) %defattr(-,root,root,-)
%dir %{perl5_vendorlib}/Test %dir %{perl5_vendorlib}/Test
%attr(0444,root,root) %{perl5_vendorlib}/Test/FailWarnings.pm %attr(0444,root,root) %{perl5_vendorlib}/Test/Warnings.pm
%attr(0644,root,root) %{_mandir}/man3/Test::FailWarnings.3* %attr(0644,root,root) %{_mandir}/man3/Test::Warnings.3*
%license LICENSE %license LICENCE
%doc CONTRIBUTING Changes LICENSE README %doc CONTRIBUTING Changes LICENCE README
%doc %{name}-make.test.log %doc %{name}-make.test.log
%changelog %changelog
* Sun Apr 23 2023 Michael A. Peters <anymouseprophet@gmail.com> - 0.008-0.rc3 * Sun Apr 23 2023 Michael A. Peters <anymouseprophet@gmail.com> - 0.031-0.rc2
- BuildRequires perl-devel - BuildRequire perl-devel
- Conditionally run tests, require %%perl5_API - Conditionally require some optional test dependencies
- Conditionally run tests
- Require %%perl5_API
* Fri Apr 21 2023 Michael A. Peters <anymouseprophet@gmail.com> - 0.008-0.rc1 * Sat Apr 22 2023 Michael A. Peters <anymouseprophet@gmail.com> - 0.031-0.rc1
- Initial spec file for YJL (RPM bootstrapping LFS/BLFS 11.3) - Initial spec file for YJL (RPM bootstrapping LFS/BLFS 11.3)