3 %bcond_without tests # do not perform "make test"
5 %include /usr/lib/rpm/macros.perl
8 Summary: Test::Deep - Extremely flexible deep comparison
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
21 BuildRequires: perl-Test-NoWarnings >= 0.02
22 BuildRequires: perl-Test-Tester >= 0.04
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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.
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
46 %setup -q -n %{pdir}-%{pnam}-%{version}
49 %{__perl} Makefile.PL \
53 %{?with_tests:%{__make} test}
56 rm -rf $RPM_BUILD_ROOT
59 DESTDIR=$RPM_BUILD_ROOT
62 rm -rf $RPM_BUILD_ROOT
65 %defattr(644,root,root,755)
66 %doc CHANGES README TODO
67 %{perl_vendorlib}/Test/*.pm
68 %{perl_vendorlib}/Test/Deep