]> git.pld-linux.org Git - packages/perl-Test-Warnings.git/blame - perl-Test-Warnings.spec
- updated to 0.031
[packages/perl-Test-Warnings.git] / perl-Test-Warnings.spec
CommitLineData
de52701a
JR
1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4#
5%define pdir Test
6%define pnam Warnings
de52701a 7Summary: Test::Warnings - Test for warnings and the lack of them
c9d0fed0 8Summary(pl.UTF-8): Test::Warnings - testowanie pod kątem ostrzeżeń i ich braku
de52701a 9Name: perl-Test-Warnings
21ed0d91 10Version: 0.031
de52701a 11Release: 1
c9d0fed0 12# same as perl 5
de52701a
JR
13License: GPL v1+ or Artistic
14Group: Development/Languages/Perl
15Source0: http://www.cpan.org/modules/by-module/Test/%{pdir}-%{pnam}-%{version}.tar.gz
21ed0d91 16# Source0-md5: f608f7011b0bb8f27d3a27e646a52f60
fc75028b 17URL: https://metacpan.org/release/Test-Warnings
de52701a
JR
18BuildRequires: perl-devel >= 1:5.8.0
19BuildRequires: rpm-perlprov >= 4.1-13
fc75028b 20BuildRequires: rpmbuild(macros) >= 1.745
de52701a 21%if %{with tests}
c9d0fed0 22BuildRequires: perl-Test-Simple >= 0.94
de52701a
JR
23%endif
24BuildArch: noarch
25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27%description
c9d0fed0
JB
28If you've ever tried to use Test::NoWarnings to confirm there are no
29warnings generated by your tests, combined with the convenience of
30done_testing to not have to declare a test count, you'll have
31discovered that these two features do not play well together, as the
32test count will be calculated before the warnings test is run,
33resulting in a TAP error.
de52701a
JR
34
35This module is intended to be used as a drop-in replacement for
c9d0fed0
JB
36Test::NoWarnings: it also adds an extra test, but runs this test
37before done_testing calculates the test count, rather than after. It
38does this by hooking into done_testing as well as via an END block.
39You can declare a plan, or not, and things will still Just Work.
40
41%description -l pl.UTF-8
42Przy próbie użycia Test::NoWarnings w celu upewnienia się, że testy
43nie generują ostrzeżeń w połączeniu z wygodą done_testing, aby nie
44trzeba było deklarować liczby testów, okazuje się, że udogodnienia te
45nie współpracują dobrze ze sobą - liczba testów jest obliczana przed
46uruchomieniem testu ostrzeżeń, czego wynikiem jest błąd TAP.
47
48Ten moduł jest pomyślany jako zamiennik Test::Nowarnings - także
49dodaje dodatkowy test, ale uruchamia go zanim done_testing obliczy
50liczbę testów, a nie po tym. Robi to przez wstawienie w done_testing,
51a także poprzez blok END. Można zadeklarować plan lub nie, a wszystko
52będzie po prostu działać.
de52701a
JR
53
54%prep
55%setup -q -n %{pdir}-%{pnam}-%{version}
56
57%build
c9d0fed0
JB
58%{__perl} Makefile.PL \
59 INSTALLDIRS=vendor
60
61%{__make}
de52701a 62
c9d0fed0 63%{?with_tests:%{__make} test}
de52701a
JR
64
65%install
66rm -rf $RPM_BUILD_ROOT
67
c9d0fed0
JB
68%{__make} pure_install \
69 DESTDIR=$RPM_BUILD_ROOT
de52701a
JR
70
71install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
72cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
73
74%clean
75rm -rf $RPM_BUILD_ROOT
76
77%files
78%defattr(644,root,root,755)
76a0d6bc 79%doc Changes README
de52701a 80%{perl_vendorlib}/Test/Warnings.pm
c9d0fed0 81%{_mandir}/man3/Test::Warnings.3pm*
de52701a 82%{_examplesdir}/%{name}-%{version}
This page took 0.228315 seconds and 4 git commands to generate.