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