]> git.pld-linux.org Git - packages/perl-Test-Deep.git/blob - perl-Test-Deep.spec
- initial revision
[packages/perl-Test-Deep.git] / perl-Test-Deep.spec
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    Deep
8 Summary:        Test::Deep - Extremely flexible deep comparison
9 #Summary(pl):   
10 Name:           perl-Test-Deep
11 Version:        0.092
12 Release:        1
13 # same as perl
14 License:        GPL v1+ or Artistic
15 Group:          Development/Languages/Perl
16 Source0:        http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
17 # Source0-md5:  2b08c439013db230dc153cf52553fd7a
18 BuildRequires:  perl-devel >= 1:5.8.0
19 BuildRequires:  rpm-perlprov >= 4.1-13
20 %if %{with tests}
21 BuildRequires:  perl-Test-NoWarnings >= 0.02
22 BuildRequires:  perl-Test-Tester >= 0.04
23 %endif
24 BuildArch:      noarch
25 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27 %description
28 Test::Deep gives you very flexible ways to check that the result you got is
29 the result you were expecting. At it's simplest it compares two structures
30 by going through each level, ensuring that the values match, that arrays and
31 hashes have the same elements and that references are blessed into the
32 correct class. It also handles circular data structures without getting
33 caught in an infinite loop.
34
35 Where it becomes more interesting is in allowing you to do something besides
36 simple exact comparisons. With strings, the eq operator checks that 2
37 strings are exactly equal but sometimes that's not what you want. When you
38 don't know exactly what the string should be but you do know some things
39 about how it should look, eq is no good and you must use pattern matching
40 instead. Test::Deep provides pattern matching for complex data structures
41
42 # %description -l pl
43 # TODO
44
45 %prep
46 %setup -q -n %{pdir}-%{pnam}-%{version}
47
48 %build
49 %{__perl} Makefile.PL \
50         INSTALLDIRS=vendor
51 %{__make}
52
53 %{?with_tests:%{__make} test}
54
55 %install
56 rm -rf $RPM_BUILD_ROOT
57
58 %{__make} install \
59         DESTDIR=$RPM_BUILD_ROOT
60
61 %clean
62 rm -rf $RPM_BUILD_ROOT
63
64 %files
65 %defattr(644,root,root,755)
66 %doc CHANGES README TODO
67 %{perl_vendorlib}/Test/*.pm
68 %{perl_vendorlib}/Test/Deep
69 %{_mandir}/man3/*
This page took 0.056853 seconds and 3 git commands to generate.