2009-08-04 10:23:04 +00:00
|
|
|
#
|
2011-11-17 15:51:18 +00:00
|
|
|
# spec file for package perl-Test-Deep
|
2009-08-04 10:23:04 +00:00
|
|
|
#
|
2017-01-06 20:16:15 +00:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2009-08-04 10:23:04 +00:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2010-10-06 20:47:28 +00:00
|
|
|
|
2009-08-04 10:23:04 +00:00
|
|
|
Name: perl-Test-Deep
|
2017-05-12 06:03:59 +00:00
|
|
|
Version: 1.127
|
2012-02-20 08:44:38 +00:00
|
|
|
Release: 0
|
2010-10-06 20:47:30 +00:00
|
|
|
%define cpan_name Test-Deep
|
2009-08-04 10:23:04 +00:00
|
|
|
Summary: Extremely flexible deep comparison
|
2015-03-10 07:50:42 +00:00
|
|
|
License: Artistic-1.0 or GPL-1.0+
|
2009-08-04 10:23:04 +00:00
|
|
|
Group: Development/Libraries/Perl
|
2010-10-06 20:47:30 +00:00
|
|
|
Url: http://search.cpan.org/dist/Test-Deep/
|
2017-05-12 06:03:59 +00:00
|
|
|
Source0: https://cpan.metacpan.org/authors/id/R/RJ/RJBS/%{cpan_name}-%{version}.tar.gz
|
2017-01-06 20:16:15 +00:00
|
|
|
Source1: cpanspec.yml
|
2010-10-06 20:47:30 +00:00
|
|
|
BuildArch: noarch
|
2009-08-04 10:23:04 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: perl-macros
|
2017-01-06 20:16:15 +00:00
|
|
|
BuildRequires: perl(Test::More) >= 0.88
|
2010-10-06 20:47:30 +00:00
|
|
|
BuildRequires: perl(Test::Tester) >= 0.04
|
2012-02-20 08:44:38 +00:00
|
|
|
%{perl_requires}
|
2017-01-06 20:16:15 +00:00
|
|
|
# MANUAL BEGIN
|
2015-03-10 10:41:25 +00:00
|
|
|
# necessary because Test::Deep::NoTest does "require Test::Builder"
|
|
|
|
Requires: perl-Test-Simple
|
2017-01-06 20:16:15 +00:00
|
|
|
# MANUAL END
|
2009-08-04 10:23:04 +00:00
|
|
|
|
|
|
|
%description
|
2010-10-06 20:47:30 +00:00
|
|
|
If you don't know anything about automated testing in Perl then you should
|
|
|
|
probably read about Test::Simple and Test::More before preceding.
|
|
|
|
Test::Deep uses the Test::Builder framework.
|
2009-08-04 10:23:04 +00:00
|
|
|
|
2012-02-20 08:44:38 +00:00
|
|
|
Test::Deep gives you very flexible ways to check that the result you got is
|
|
|
|
the result you were expecting. At it's simplest it compares two structures
|
|
|
|
by going through each level, ensuring that the values match, that arrays
|
|
|
|
and hashes have the same elements and that references are blessed into the
|
|
|
|
correct class. It also handles circular data structures without getting
|
|
|
|
caught in an infinite loop.
|
|
|
|
|
|
|
|
Where it becomes more interesting is in allowing you to do something
|
|
|
|
besides simple exact comparisons. With strings, the 'eq' operator checks
|
|
|
|
that 2 strings are exactly equal but sometimes that's not what you want.
|
|
|
|
When you don't know exactly what the string should be but you do know some
|
|
|
|
things about how it should look, 'eq' is no good and you must use pattern
|
|
|
|
matching instead. Test::Deep provides pattern matching for complex data
|
|
|
|
structures
|
2009-08-04 10:23:04 +00:00
|
|
|
|
2017-05-12 06:03:59 +00:00
|
|
|
Test::Deep has *_a lot_* of exports. See EXPORTS below.
|
2015-03-10 07:50:42 +00:00
|
|
|
|
2009-08-04 10:23:04 +00:00
|
|
|
%prep
|
|
|
|
%setup -q -n %{cpan_name}-%{version}
|
|
|
|
|
|
|
|
%build
|
2010-10-06 20:47:30 +00:00
|
|
|
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
2010-01-12 11:13:23 +00:00
|
|
|
%{__make} %{?_smp_mflags}
|
2009-08-04 10:23:04 +00:00
|
|
|
|
|
|
|
%check
|
2010-10-06 20:47:30 +00:00
|
|
|
%{__make} test
|
2009-08-04 10:23:04 +00:00
|
|
|
|
|
|
|
%install
|
|
|
|
%perl_make_install
|
2012-02-20 08:44:38 +00:00
|
|
|
%perl_process_packlist
|
2009-08-04 10:23:04 +00:00
|
|
|
%perl_gen_filelist
|
|
|
|
|
|
|
|
%files -f %{name}.files
|
2012-02-20 08:44:38 +00:00
|
|
|
%defattr(-,root,root,755)
|
2013-12-09 11:26:10 +00:00
|
|
|
%doc Changes README TODO
|
2009-08-04 10:23:04 +00:00
|
|
|
|
|
|
|
%changelog
|