]> git.pld-linux.org Git - packages/perl-Test-Warnings.git/blob - perl-Test-Warnings.spec
1d7cc2c825d853f37001eaeed7479315d7555c04
[packages/perl-Test-Warnings.git] / perl-Test-Warnings.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4 #
5 %define         pdir    Test
6 %define         pnam    Warnings
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
11 Version:        0.020
12 Release:        1
13 # same as perl 5
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
21 %if %{with tests}
22 BuildRequires:  perl-Test-Deep
23 BuildRequires:  perl-Test-Simple >= 0.94
24 BuildRequires:  perl-Test-Tester >= 0.108
25 %endif
26 BuildArch:      noarch
27 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29 %description
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.
36
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.
42
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.
49
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ć.
55
56 %prep
57 %setup -q -n %{pdir}-%{pnam}-%{version}
58
59 %build
60 %{__perl} Makefile.PL \
61         INSTALLDIRS=vendor
62
63 %{__make}
64
65 %{?with_tests:%{__make} test}
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69
70 %{__make} pure_install \
71         DESTDIR=$RPM_BUILD_ROOT
72
73 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
74 cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
75
76 %clean
77 rm -rf $RPM_BUILD_ROOT
78
79 %files
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}
This page took 0.080146 seconds and 3 git commands to generate.