]> git.pld-linux.org Git - packages/perl-Test-Strict.git/blame - perl-Test-Strict.spec
- BR: perl-Scalar-List-Utils
[packages/perl-Test-Strict.git] / perl-Test-Strict.spec
CommitLineData
aae06d69
MP
1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4#
5%include /usr/lib/rpm/macros.perl
6%define pdir Test
7%define pnam Strict
8Summary: Test::Strict - Check syntax, presence of use strict; and test coverage
78dc65a3 9Summary(pl.UTF-8): Test::Strict - sprawdzanie składni, obecności "use strict" i pokrycia testami
aae06d69 10Name: perl-Test-Strict
cf929fca 11Version: 0.37
aae06d69 12Release: 1
cf929fca 13# same as perl 5
aae06d69
MP
14License: GPL v1+ or Artistic
15Group: Development/Languages/Perl
78dc65a3 16Source0: http://www.cpan.org/modules/by-module/Test/%{pdir}-%{pnam}-%{version}.tar.gz
cf929fca 17# Source0-md5: 739d91c3404e341245ebd0a0081ddc31
78dc65a3 18URL: http://search.cpan.org/dist/Test-Strict/
aae06d69
MP
19BuildRequires: perl-devel >= 1:5.8.0
20BuildRequires: rpm-perlprov >= 4.1-13
21%if %{with tests}
78dc65a3 22BuildRequires: perl-Devel-Cover >= 0.43
05010d4c 23BuildRequires: perl-Scalar-List-Utils
cf929fca
JB
24BuildRequires: perl-Test-Pod >= 1.48
25BuildRequires: perl-Test-Pod-Coverage >= 1.10
aae06d69
MP
26%endif
27BuildArch: noarch
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30%description
78dc65a3
JB
31The most basic test one can write is "does it compile?". This module
32tests if the code compiles and play nice with Test::Simple modules.
aae06d69 33
78dc65a3
JB
34Another good practice this module can test is to "use strict;" in all
35perl files.
aae06d69 36
78dc65a3
JB
37By setting a minimum test coverage through all_cover_ok(), a code
38author can ensure his code is tested above a preset level of quality
39throughout the development cycle.
aae06d69 40
78dc65a3
JB
41Along with Test::Pod, this module can provide the first tests to setup
42for a module author.
aae06d69 43
78dc65a3
JB
44%description -l pl.UTF-8
45Najbardziej podstawowym testem, który można napisać, to "czy to się
46kompiluje?". Ten moduł sprawdza więc, czy kod się kompiluje i dobrze
47współpracuje z modułami Test::Simple.
aae06d69 48
78dc65a3
JB
49Inną dobrą praktyką, jaką może testować ten moduł, to czy wszystkie
50pliki perlowe zawierają "use strict;".
aae06d69 51
78dc65a3
JB
52Ustawiając minimalne pokrycie testami poprzez all_cover_ok(), autor
53kodu może upewnić się, że jego kod jest testowany pod kątem
54określonego poziomu jakości.
55
56Wraz z Test::Pod ten moduł może zapewnić autorom modułów pierwsze
57testy.
aae06d69
MP
58
59%prep
60%setup -q -n %{pdir}-%{pnam}-%{version}
61
62%build
63%{__perl} Makefile.PL \
64 INSTALLDIRS=vendor
65%{__make}
66
67%{?with_tests:%{__make} test}
68
69%install
70rm -rf $RPM_BUILD_ROOT
71
72%{__make} install \
73 DESTDIR=$RPM_BUILD_ROOT
74
75%clean
76rm -rf $RPM_BUILD_ROOT
77
78%files
79%defattr(644,root,root,755)
80%doc Changes README
cf929fca
JB
81%{perl_vendorlib}/Test/Strict.pm
82%{_mandir}/man3/Test::Strict.3pm*
This page took 0.064315 seconds and 4 git commands to generate.