]>
Commit | Line | Data |
---|---|---|
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 | |
8 | Summary: Test::Strict - Check syntax, presence of use strict; and test coverage | |
78dc65a3 | 9 | Summary(pl.UTF-8): Test::Strict - sprawdzanie składni, obecności "use strict" i pokrycia testami |
aae06d69 | 10 | Name: perl-Test-Strict |
cf929fca | 11 | Version: 0.37 |
aae06d69 | 12 | Release: 1 |
cf929fca | 13 | # same as perl 5 |
aae06d69 MP |
14 | License: GPL v1+ or Artistic |
15 | Group: Development/Languages/Perl | |
78dc65a3 | 16 | Source0: http://www.cpan.org/modules/by-module/Test/%{pdir}-%{pnam}-%{version}.tar.gz |
cf929fca | 17 | # Source0-md5: 739d91c3404e341245ebd0a0081ddc31 |
78dc65a3 | 18 | URL: http://search.cpan.org/dist/Test-Strict/ |
aae06d69 MP |
19 | BuildRequires: perl-devel >= 1:5.8.0 |
20 | BuildRequires: rpm-perlprov >= 4.1-13 | |
21 | %if %{with tests} | |
78dc65a3 | 22 | BuildRequires: perl-Devel-Cover >= 0.43 |
05010d4c | 23 | BuildRequires: perl-Scalar-List-Utils |
cf929fca JB |
24 | BuildRequires: perl-Test-Pod >= 1.48 |
25 | BuildRequires: perl-Test-Pod-Coverage >= 1.10 | |
aae06d69 MP |
26 | %endif |
27 | BuildArch: noarch | |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
30 | %description | |
78dc65a3 JB |
31 | The most basic test one can write is "does it compile?". This module |
32 | tests if the code compiles and play nice with Test::Simple modules. | |
aae06d69 | 33 | |
78dc65a3 JB |
34 | Another good practice this module can test is to "use strict;" in all |
35 | perl files. | |
aae06d69 | 36 | |
78dc65a3 JB |
37 | By setting a minimum test coverage through all_cover_ok(), a code |
38 | author can ensure his code is tested above a preset level of quality | |
39 | throughout the development cycle. | |
aae06d69 | 40 | |
78dc65a3 JB |
41 | Along with Test::Pod, this module can provide the first tests to setup |
42 | for a module author. | |
aae06d69 | 43 | |
78dc65a3 JB |
44 | %description -l pl.UTF-8 |
45 | Najbardziej podstawowym testem, który można napisać, to "czy to się | |
46 | kompiluje?". Ten moduł sprawdza więc, czy kod się kompiluje i dobrze | |
47 | współpracuje z modułami Test::Simple. | |
aae06d69 | 48 | |
78dc65a3 JB |
49 | Inną dobrą praktyką, jaką może testować ten moduł, to czy wszystkie |
50 | pliki perlowe zawierają "use strict;". | |
aae06d69 | 51 | |
78dc65a3 JB |
52 | Ustawiając minimalne pokrycie testami poprzez all_cover_ok(), autor |
53 | kodu może upewnić się, że jego kod jest testowany pod kątem | |
54 | określonego poziomu jakości. | |
55 | ||
56 | Wraz z Test::Pod ten moduł może zapewnić autorom modułów pierwsze | |
57 | testy. | |
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 | |
70 | rm -rf $RPM_BUILD_ROOT | |
71 | ||
72 | %{__make} install \ | |
73 | DESTDIR=$RPM_BUILD_ROOT | |
74 | ||
75 | %clean | |
76 | rm -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* |