3 %bcond_without tests # do not perform "make test"
6 %define pnam NoWarnings
7 Summary: Test::NoWarnings - Make sure you didn't emit any warnings while testing
8 Summary(pl.UTF-8): Test::NoWarnings - sprawdzanie braku ostrzeżeń podczas testów
9 Name: perl-Test-NoWarnings
13 Group: Development/Languages/Perl
14 Source0: http://www.cpan.org/modules/by-module/Test/%{pdir}-%{pnam}-%{version}.tar.gz
15 # Source0-md5: e44d8b1820b45a71e59a0119120ca622
16 URL: https://metacpan.org/dist/Test-NoWarnings
17 BuildRequires: perl-devel >= 1:5.8.0
18 BuildRequires: rpm-perlprov >= 4.1-13
19 BuildRequires: rpmbuild(macros) >= 1.745
21 BuildRequires: perl-Test-Simple >= 0.86
22 BuildRequires: perl-Test-Tester >= 0.107
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 In general, your tests shouldn't produce warnings. This modules causes
29 any warnings to be captured and stored. It automatically adds an extra
30 test that will run when your script ends to check that there were no
31 warnings. If there were any warings, the test will give a "not ok" and
32 diagnostics of where, when and what the warning was, including a stack
33 trace of what was going on when the it occurred.
35 If some of your tests are supposed to produce warnings then you should
36 be capturing and checking them with Test::Warn, that way
37 Test::NoWarnings will not see them and so not complain.
39 %description -l pl.UTF-8
40 W ogólności testy nie powinny generować ostrzeżeń. Ten moduł powoduje,
41 że wszystkie ostrzeżenia są przechwytywane i zapisywane. Automatycznie
42 dodaje dodatkowy test uruchamiany po zakończeniu skryptu, sprawdzający
43 czy nie było ostrzeżeń. Jeśli wystąpiły jakiekolwiek ostrzeżenia, test
44 wypisze "not ok" i dane diagnostyczne, w którym miejscu, kiedy i jakie
45 było ostrzeżenie, wraz ze śladem stosu tego, co działo się w chwili
48 Jeśli jakieś testy mają wygenerować ostrzeżenia, należy je wyłapać i
49 sprawdzić przy użyciu Test::Warn - tak, żeby Test::NoWarnings ich nie
53 %setup -q -n %{pdir}-%{pnam}-%{version}
56 %{__perl} Makefile.PL \
60 %{?with_tests:%{__make} test}
63 rm -rf $RPM_BUILD_ROOT
66 DESTDIR=$RPM_BUILD_ROOT
69 rm -rf $RPM_BUILD_ROOT
72 %defattr(644,root,root,755)
74 %{perl_vendorlib}/Test/NoWarnings.pm
75 %{perl_vendorlib}/Test/NoWarnings
76 %{_mandir}/man3/Test::NoWarnings.3pm*