#
# spec file for package perl-Test-Warn
#
# Copyright (c) 2022 SUSE LLC
#
# 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/
#


%define cpan_name Test-Warn
Name:           perl-Test-Warn
Version:        0.37
Release:        1.4
License:        Artistic-1.0 OR GPL-1.0-or-later
Summary:        Perl extension to test methods for warnings
URL:            https://metacpan.org/release/%{cpan_name}
Source0:        https://cpan.metacpan.org/authors/id/B/BI/BIGJ/%{cpan_name}-%{version}.tar.gz
Source1:        cpanspec.yml
BuildArch:      noarch
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(Carp) >= 1.22
BuildRequires:  perl(Sub::Uplevel) >= 0.12
Requires:       perl(Carp) >= 1.22
Requires:       perl(Sub::Uplevel) >= 0.12
%{perl_requires}

%description
A good style of Perl programming calls for a lot of diverse regression
tests.

This module provides a few convenience methods for testing warning
based-code.

If you are not already familiar with the Test::More manpage now would be
the time to go take a look.

%prep
%autosetup  -n %{cpan_name}-%{version}
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -name "configure" -print0 | xargs -0 chmod 644

%build
perl Makefile.PL INSTALLDIRS=vendor
%make_build

%check
make test

%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist

%files -f %{name}.files
%doc Changes README

%changelog
* Sun Aug 14 2022 Tina Müller <timueller+perl@suse.de>
- updated to 0.37
  see /usr/share/doc/packages/perl-Test-Warn/Changes
  0.37  2022-08-13
    Merged PR:
  - allow duplicate warnings when using warnings_exist
    https://github.com/hanfried/test-warn/pull/8
    thx to Masahiro Honma (hiratara)
* Sun Jun 24 2018 coolo@suse.com
- updated to 0.36
  see /usr/share/doc/packages/perl-Test-Warn/Changes
  0.36  2018-06-23
  - Added provide section to META.yml via changing Makefile.PL
* Fri Jun 15 2018 coolo@suse.com
- updated to 0.35
  see /usr/share/doc/packages/perl-Test-Warn/Changes
  0.35  2018-06-13
    Merged several Pull Requests:
  - README clean-up: Assign Copyright to current author
    https://github.com/hanfried/test-warn/pull/6
    thx to Andrew Grangaard (spazm)
  - Pod cleanup
    https://github.com/hanfried/test-warn/pull/5
    thx to Andrew Grangaar (spazm) and Gabor Szabo (szabgab)
  - add missing comma
    https://github.com/hanfried/test-warn/pull/4
    thx to Desmond Daignault (nawglan)
  - Nawglan/update meta yml
    https://github.com/hanfried/test-warn/pull/3
    thx to Desmond Daignault (nawglan) and Karen Etheridge (karenetheridge)
  - create META.json so that perl Makefile.PL stops complaining
    https://github.com/hanfried/test-warn/pull/2
    thx to Desmond Daignault (nawglan) and Karen Etheridge (karenetheridge)
* Sun Jun 10 2018 coolo@suse.com
- updated to 0.34
  see /usr/share/doc/packages/perl-Test-Warn/Changes
  0.34  2018-05-31
  - Added a note that XS warnings might not be caught
    https://rt.cpan.org/Ticket/Display.html?id=42070&results=3c71d1b101a730e185691657f3b02f21
    https://github.com/hanfried/test-warn/issues/1
  - Removed TODO section
  - Updated Copyright section
  0.33  2018-05-29
  - Patch from Era Eriksson to clean up some manpage language
    Bug-Debian: #322351
    https://rt.cpan.org/Ticket/Display.html?id=49519
* Sat Dec 24 2016 coolo@suse.com
- updated to 0.32
  see /usr/share/doc/packages/perl-Test-Warn/Changes
  0.32  2016-12-23
  - updating github information
  - updating changes
  0.31  2016-12-16
  - handling warnings with trailing newlines
* Sun Dec 18 2016 coolo@suse.com
- updated to 0.31
  see /usr/share/doc/packages/perl-Test-Warn/Changes
* Thu Dec  4 2014 ncutler@suse.com
- updated to 0.30
  - important note in documentation how check for warning category is done
    If you use Test::Warn with categories, you should check that it does
    what you expect.
  - Category tree is now dynamic and does not use Tree::DAG_Node (Graham Knop)
- regenerated spec file
* Tue May 29 2012 coolo@suse.com
- updated to 0.24
  - compatibility with Carp 1.25 (RURBAN)
  - require Carp 1.22
  - carped.t would better work on Windows
* Fri Nov 18 2011 coolo@suse.com
- use original .tar.gz
* Mon Feb 28 2011 vcizek@novell.com
- update to 0.23
  - compatibility with Perl 5.14 (ANDK)
* Wed Dec  1 2010 coolo@novell.com
- switch to perl_requires macro
* Mon Sep 13 2010 anicka@suse.cz
- update to 0.22
  * fixes in English
* Fri Dec 11 2009 chris@computersalat.de
- update to version 0.21
  * rename internal package Tree::MyDAG_Node with Test::Warn::DAG_Node_Tree
- 0.20  Aug 29 2009
  * fix warning_exists.t for perl 5.6.2
  * warnings_exists was renamed to warnings_exist
  * compatibility layer in Makefile.PL
- 0.11_02  Jun 16 2009
  * carped.t will work on VMS (RT#39579)
  * fix warning_exists.t for perl 5.10
  * warning_exists was renamed to warnings_exists
- 0.11_01  Jun 14 2009
  * small changes
  * MIN_PERL_VERSION in Makefile.PL
  * Array::Compare is not needed
  * allow files with spaces in path (RT#21545 by frew )
  * Test::Exception is also not needed
  * warning_exists added
- cleanup spec
  * sort tags
  * fixed build-/deps
    o removed perl-Array-Compare
    o removed perl-Test-Exception
  * added author
- added perl-macros
  * perl_gen_filelist
* Fri Jul 25 2008 anicka@suse.cz
- update to 0.11
  * better Makefile.PL
  * mention Test::Trap
  * uplevel 2 changed to uplevel 1 to work with Sub::Uplevel 0.19_02
  * small fixes
* Wed Mar 12 2008 anicka@suse.cz
- package created (version 0.10)