]> git.pld-linux.org Git - packages/perl-Test-FailWarnings.git/commitdiff
- initial master auto/th/perl-Test-FailWarnings-0.008-1
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 21 Jul 2020 09:08:37 +0000 (11:08 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 21 Jul 2020 09:08:37 +0000 (11:08 +0200)
perl-Test-FailWarnings.spec [new file with mode: 0644]

diff --git a/perl-Test-FailWarnings.spec b/perl-Test-FailWarnings.spec
new file mode 100644 (file)
index 0000000..bbcf9e3
--- /dev/null
@@ -0,0 +1,57 @@
+#
+# Conditional build:
+%bcond_without tests           # do not perform "make test"
+#
+%define                pdir    Test
+%define                pnam    FailWarnings
+Summary:       Test::FailWarnings - Add test failures if warnings are caught
+Name:          perl-Test-FailWarnings
+Version:       0.008
+Release:       1
+License:       apache
+Group:         Development/Languages/Perl
+Source0:       http://www.cpan.org/modules/by-module/Test/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5: c03d51f550dbfd9945722ff7f4c32717
+URL:           https://metacpan.org/release/Test-FailWarnings
+BuildRequires: perl-devel >= 1:5.8.0
+BuildRequires: rpm-perlprov >= 4.1-13
+BuildRequires: rpmbuild(macros) >= 1.745
+%if %{with tests}
+BuildRequires: perl-Capture-Tiny >= 0.12
+%endif
+BuildArch:     noarch
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+This module hooks $SIG{__WARN__} and converts warnings to Test::More
+fail() calls. It is designed to be used with done_testing, when you
+don't need to know the test count in advance.
+
+Just as with Test::NoWarnings, this does not catch warnings if other
+things localize $SIG{__WARN__}, as this is designed to catch unhandled
+warnings.
+
+%prep
+%setup -q -n %{pdir}-%{pnam}-%{version}
+
+%build
+%{__perl} Makefile.PL \
+       INSTALLDIRS=vendor
+%{__make}
+
+%{?with_tests:%{__make} test}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} pure_install \
+       DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc Changes README
+%{perl_vendorlib}/Test/FailWarnings.pm
+%{_mandir}/man3/Test::FailWarnings.3*
This page took 0.093354 seconds and 4 git commands to generate.