#
# spec file for package perl-Test-Deep
#
# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 https://bugs.opensuse.org/
#


Name:           perl-Test-Deep
Version:        1.130
Release:        1.1
%define cpan_name Test-Deep
Summary:        Extremely flexible deep comparison
License:        Artistic-1.0 OR GPL-1.0-or-later
Group:          Development/Libraries/Perl
Url:            https://metacpan.org/release/%{cpan_name}
Source0:        https://cpan.metacpan.org/authors/id/R/RJ/RJBS/%{cpan_name}-%{version}.tar.gz
Source1:        cpanspec.yml
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(Test::More) >= 0.88
BuildRequires:  perl(Test::Tester) >= 0.04
%{perl_requires}
# MANUAL BEGIN
# necessary because Test::Deep::NoTest does "require Test::Builder"
Requires:       perl-Test-Simple
# MANUAL END

%description
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.

Test::Deep gives you very flexible ways to check that the result you got is
the result you were expecting. At its 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

Test::Deep has *_a lot_* of exports. See EXPORTS below.

%prep
%setup -q -n %{cpan_name}-%{version}

%build
perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}

%check
make test

%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist

%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes README TODO

%changelog
* Mon Mar  2 2020 <timueller+perl@suse.de>
- updated to 1.130
  see /usr/share/doc/packages/perl-Test-Deep/Changes
  1.130     2020-03-01
  - no changes since 1.129
  1.129     2020-01-26 - TRIAL RELEASE
  - documentation fixes (thanks, Daniel Böhmer!)
  - allow NoTest to be used without breaking other Test::Deep
    (thanks, Alexander Karelas!)
  - added true/false optional imports (thanks, Denis Ibaev!)
* Fri Apr 20 2018 coolo@suse.com
- updated to 1.128
  see /usr/share/doc/packages/perl-Test-Deep/Changes
  1.128     2018-04-18
  - numerous small improvements to documentation; thanks to
    Fabrice Gabolde, Daniel Böhmer, Lance Wicks, Matthew Horsfall
  - improved CI setup; thanks to eadjei and Philip J. Ludlam
* Sat May  6 2017 coolo@suse.com
- updated to 1.127
  see /usr/share/doc/packages/perl-Test-Deep/Changes
  1.127     2017-05-04
  - no code changes from previous release
  1.126_001 2017-04-17
  - do not eagerly convert simple scalars into tests in the all, any, and
    none tests; this was breaking LeafWrapper application
* Fri Jan  6 2017 coolo@suse.com
- updated to 1.126
  see /usr/share/doc/packages/perl-Test-Deep/Changes
* Tue Mar 10 2015 ncutler@suse.com
- add "Requires: perl-Test-Simple" to spec (hidden dependency
  not caught by cpanspec)
* Tue Mar 10 2015 ncutler@suse.com
- updated to 0.115
  - worked around a bug in chained goto on 5.8.5
  - improve prereqs metadata (thanks, Karen Etheridge)
  - add a noneof() set test (thanks, Peter Haworth)
  - regexponly hasn't worked... ever. now it does
  - passing :preload to import loads all plugins up front
  - a few more tests have been documented
  - the many exports of Test::Deep are now documented!
  - fix a compile error (!!) in RegexpOnly
  - fix some documentation typos (thanks, ZOFFIX)
  - add license to META file
* Mon Dec  9 2013 coolo@suse.com
- updated to 0.112
  - rebuild MANIFEST, adding two forgotten files
  - When printing diagnostics, differentiate the type of a blessed object
    from the name of the class itself (RT#78288, caused by changes to how
    blessed objects are treated in 0.109) (thanks, Karen Etheridge)
  - Typo fixes (thanks, David Steinbrunner)
  - Fixes to clarity and accuracy of documentation (thanks, Michael Hamlin)
  - Add metadata links to repo and issue tracker
  - Added obj_isa for testing ->isa without falling back to ref($x)
  - Added the *experimental* ":v1" export group to skip importing
    Isa, isa, and blessed
* Tue Jun  4 2013 coolo@suse.com
- updated to 0.110
    Allow methods() and listmethods() to work again on class methods
    (RT#77804) (thanks, Ricardo Signes!)
* Mon Feb 20 2012 coolo@suse.com
- updated to 0.109
    UNIVERSAL::isa and UNIVERAL::can are no longer called as functions:
    this was deprecated in UNIVERSAL 1.03. (RT#74760, Karen Etheridge)
    the code that builds the exporter configuration is cleaned up; more
    documentation of how it may change (for the better, without breaking
    stuff) should appear in the near future
* Fri Nov 18 2011 coolo@suse.com
- use original .tar.gz
* Wed Dec  1 2010 coolo@novell.com
- switch to perl_requires macro
* Sat Oct 16 2010 chris@computersalat.de
- update to 0.108
  o simple (stringwise) comparison should now be much faster
    (thanks, NCLEATON)
- fix deps
* Thu Sep 30 2010 chris@computersalat.de
- update to 0.107
  o New maintainer:  Ricardo Signes (rjbs)
  o On 5.10.0 and newer perl, install to the "site" directory, not the
    core perl directory in @INC.  (Prior to 5.10.0, @INC ordering was
    unfortunate, and fixing the install target would make upgrading
    difficult.)
  o cope with new stringification of qr{} objects in 5.13.x+ (thanks,
    ANDK)
  o fix Pod escaping errors (thanks, FWIE)
- noarch pkg
- recreated by cpanspec 1.78
* Sun Jan 10 2010 jengelh@medozas.de
- enable parallel build
* Mon Sep  7 2009 mls@suse.de
- update to 0.106 to make it build with perl-5.10.1
* Sat Jul 25 2009 chris@computersalat.de
- spec mods
  * removed ^----------
  * removed ^#---------
* Sat Jun 20 2009 chris@computersalat.de
- initial obs package 0.104