]>
Commit | Line | Data |
---|---|---|
92ce0b57 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
5 | %define pdir Test | |
6 | %define pnam Identity | |
92ce0b57 JB |
7 | Summary: Test::Identity - assert the referential identity of a reference |
8 | Summary(pl.UTF-8): Test::Identity - sprawdzenie identyczności referencji | |
9 | Name: perl-Test-Identity | |
10 | Version: 0.01 | |
11 | Release: 1 | |
12 | # same as perl | |
13 | License: GPL v1+ or Artistic | |
14 | Group: Development/Languages/Perl | |
15 | Source0: http://www.cpan.org/modules/by-module/Test/PEVANS/Test-Identity-%{version}.tar.gz | |
16 | # Source0-md5: ecef85c791cf5847e4c374983cf22a74 | |
17 | URL: http://search.cpan.org/dist/Test-Identity/ | |
18 | BuildRequires: perl-Module-Build | |
19 | BuildRequires: perl-devel >= 1:5.8.0 | |
20 | BuildRequires: rpm-perlprov >= 4.1-13 | |
21 | %if %{with tests} | |
22 | BuildRequires: perl-Test-Simple | |
23 | %endif | |
24 | BuildArch: noarch | |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
26 | ||
27 | %description | |
28 | This module provides a single testing function, identical. It asserts | |
29 | that a given reference is as expected; that is, it either refers to | |
30 | the same object or is undef. It is similar to Test::More::is except | |
31 | that it uses refaddr, ensuring that it behaves correctly even if the | |
32 | references under test are objects that overload stringification or | |
33 | numification. It also provides better diagnostics if the test fails. | |
34 | ||
35 | %description -l pl.UTF-8 | |
36 | Ten moduł udostępnia pojedynczą funkcję testującą: identical, służącą | |
37 | do upewnienia się, że podana referencja jest zgodna z oczekiwaniami, | |
38 | tzn. albo odnosi się do tego samego obiektu, albo jest równa undef. | |
39 | Jest podobna do Test::More::is, ale używa refaddr, więc działa | |
40 | poprawnie nawet jeśli testowane referencje są obiektami | |
41 | przeciążającymi konwersję na łańcuch lub liczbę. Moduł zapewnia także | |
42 | lepszą diagnostykę w przypadku niepowodzenia testu. | |
43 | ||
44 | %prep | |
45 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
46 | ||
47 | %build | |
48 | %{__perl} Build.PL \ | |
49 | destdir=$RPM_BUILD_ROOT \ | |
50 | installdirs=vendor | |
51 | ./Build | |
52 | ||
53 | %{?with_tests:./Build test} | |
54 | ||
55 | %install | |
56 | rm -rf $RPM_BUILD_ROOT | |
57 | ||
58 | ./Build install | |
59 | ||
60 | %clean | |
61 | rm -rf $RPM_BUILD_ROOT | |
62 | ||
63 | %files | |
64 | %defattr(644,root,root,755) | |
65 | %doc Changes README | |
66 | %{perl_vendorlib}/Test/Identity.pm | |
67 | %{_mandir}/man3/Test::Identity.3pm* |