3 %bcond_without tests # do not perform "make test"
7 %include /usr/lib/rpm/macros.perl
8 Summary: Test::Warnings - Test for warnings and the lack of them
9 Summary(pl.UTF-8): Test::Warnings - testowanie pod kątem ostrzeżeń i ich braku
10 Name: perl-Test-Warnings
14 License: GPL v1+ or Artistic
15 Group: Development/Languages/Perl
16 Source0: http://www.cpan.org/modules/by-module/Test/%{pdir}-%{pnam}-%{version}.tar.gz
17 # Source0-md5: c5d923fd727fea3f4b3aa91bad5ccf47
18 URL: http://search.cpan.org/dist/Test-Warnings/
19 BuildRequires: perl-devel >= 1:5.8.0
20 BuildRequires: rpm-perlprov >= 4.1-13
22 BuildRequires: perl-Test-Deep
23 BuildRequires: perl-Test-Simple >= 0.94
24 BuildRequires: perl-Test-Tester >= 0.108
27 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30 If you've ever tried to use Test::NoWarnings to confirm there are no
31 warnings generated by your tests, combined with the convenience of
32 done_testing to not have to declare a test count, you'll have
33 discovered that these two features do not play well together, as the
34 test count will be calculated before the warnings test is run,
35 resulting in a TAP error.
37 This module is intended to be used as a drop-in replacement for
38 Test::NoWarnings: it also adds an extra test, but runs this test
39 before done_testing calculates the test count, rather than after. It
40 does this by hooking into done_testing as well as via an END block.
41 You can declare a plan, or not, and things will still Just Work.
43 %description -l pl.UTF-8
44 Przy próbie użycia Test::NoWarnings w celu upewnienia się, że testy
45 nie generują ostrzeżeń w połączeniu z wygodą done_testing, aby nie
46 trzeba było deklarować liczby testów, okazuje się, że udogodnienia te
47 nie współpracują dobrze ze sobą - liczba testów jest obliczana przed
48 uruchomieniem testu ostrzeżeń, czego wynikiem jest błąd TAP.
50 Ten moduł jest pomyślany jako zamiennik Test::Nowarnings - także
51 dodaje dodatkowy test, ale uruchamia go zanim done_testing obliczy
52 liczbę testów, a nie po tym. Robi to przez wstawienie w done_testing,
53 a także poprzez blok END. Można zadeklarować plan lub nie, a wszystko
54 będzie po prostu działać.
57 %setup -q -n %{pdir}-%{pnam}-%{version}
60 %{__perl} Makefile.PL \
65 %{?with_tests:%{__make} test}
68 rm -rf $RPM_BUILD_ROOT
70 %{__make} pure_install \
71 DESTDIR=$RPM_BUILD_ROOT
73 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
74 cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
77 rm -rf $RPM_BUILD_ROOT
80 %defattr(644,root,root,755)
81 %doc CONTRIBUTING Changes README
82 %{perl_vendorlib}/Test/Warnings.pm
83 %{_mandir}/man3/Test::Warnings.3pm*
84 %{_examplesdir}/%{name}-%{version}