65fe75
# Run extra test
65fe75
%bcond_without perl_Test_Fatal_enables_extra_test
65fe75
# Run optional test
65fe75
%bcond_without perl_Test_Fatal_enables_optional_test
65fe75
65fe75
Summary:	Incredibly simple helpers for testing code with exceptions 
65fe75
Name:		perl-Test-Fatal
65fe75
Version:	0.014
65fe75
Release:	9%{?dist}
65fe75
License:	GPL+ or Artistic
65fe75
Group:		Development/Libraries
65fe75
Url:		http://search.cpan.org/dist/Test-Fatal/
65fe75
Source0:	http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Test-Fatal-%{version}.tar.gz
65fe75
BuildArch:	noarch
65fe75
# Module Build
65fe75
BuildRequires:	perl-interpreter
65fe75
BuildRequires:	perl-generators
65fe75
BuildRequires:	perl(ExtUtils::MakeMaker)
65fe75
# Module Runtime
65fe75
BuildRequires:	perl(Carp)
65fe75
BuildRequires:	perl(Exporter) >= 5.57
65fe75
BuildRequires:	perl(strict)
65fe75
BuildRequires:	perl(Test::Builder)
65fe75
BuildRequires:	perl(Try::Tiny) >= 0.07
65fe75
BuildRequires:	perl(warnings)
65fe75
# Test Suite
65fe75
BuildRequires:	perl(File::Spec)
65fe75
BuildRequires:	perl(overload)
65fe75
BuildRequires:	perl(Test::Builder::Tester)
65fe75
BuildRequires:	perl(Test::More) >= 0.96
65fe75
%if %{with perl_Test_Fatal_enables_optional_test}
65fe75
# Optional Tests
65fe75
BuildRequires:	perl(CPAN::Meta) >= 2.120900
65fe75
%endif
65fe75
%if %{with perl_Test_Fatal_enables_extra_test}
65fe75
# Extra Tests
65fe75
BuildRequires:	perl(Test::Pod) >= 1.41
65fe75
%endif
65fe75
# Runtime
65fe75
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
65fe75
Requires:	perl(Test::Builder)
65fe75
65fe75
%description
65fe75
Test::Fatal is an alternative to the popular Test::Exception. It does much
65fe75
less, but should allow greater flexibility in testing exception-throwing code
65fe75
with about the same amount of typing.
65fe75
65fe75
%prep
65fe75
%setup -q -n Test-Fatal-%{version}
65fe75
65fe75
# Avoid doc-file dependencies
65fe75
chmod -c -x examples/*
65fe75
65fe75
%build
65fe75
perl Makefile.PL INSTALLDIRS=vendor
65fe75
make %{?_smp_mflags}
65fe75
65fe75
%install
65fe75
make pure_install DESTDIR=%{buildroot}
65fe75
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
65fe75
%{_fixperms} %{buildroot}
65fe75
65fe75
%check
65fe75
make test
65fe75
%if %{with perl_Test_Fatal_enables_extra_test}
65fe75
make test TEST_FILES="$(echo $(find xt/ -name '*.t'))"
65fe75
%endif
65fe75
65fe75
%files
65fe75
%license LICENSE
65fe75
%doc Changes README examples/
65fe75
%{perl_vendorlib}/Test/
65fe75
%{_mandir}/man3/Test::Fatal.3*
65fe75
65fe75
%changelog
65fe75
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.014-9
65fe75
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
65fe75
65fe75
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.014-8
65fe75
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
65fe75
65fe75
* Mon Jun 05 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.014-7
65fe75
- Perl 5.26 rebuild
65fe75
65fe75
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.014-6
65fe75
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
65fe75
65fe75
* Sun May 15 2016 Jitka Plesnikova <jplesnik@redhat.com> - 0.014-5
65fe75
- Perl 5.24 rebuild
65fe75
65fe75
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.014-4
65fe75
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
65fe75
65fe75
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.014-3
65fe75
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
65fe75
65fe75
* Sat Jun 06 2015 Jitka Plesnikova <jplesnik@redhat.com> - 0.014-2
65fe75
- Perl 5.22 rebuild
65fe75
65fe75
* Wed Dec 10 2014 Paul Howarth <paul@city-fan.org> - 0.014-1
65fe75
- Update to 0.014
65fe75
  - Avoid assuming that t/todo.t is always called t/todo.t
65fe75
- Classify buildreqs by usage
65fe75
- Use %%license
65fe75
65fe75
* Fri Aug 29 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.013-3
65fe75
- Perl 5.20 rebuild
65fe75
65fe75
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.013-2
65fe75
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
65fe75
65fe75
* Tue Sep 24 2013 Paul Howarth <paul@city-fan.org> - 0.013-1
65fe75
- Update to 0.013
65fe75
  - Rebuild to get a newer compile test that may work on 5.6.x
65fe75
65fe75
* Tue Sep 17 2013 Paul Howarth <paul@city-fan.org> - 0.012-1
65fe75
- Update to 0.012
65fe75
  - Go back to auto-detecting the required Test::More, reverting the changes
65fe75
    made for CPAN RT#62699
65fe75
- Drop support for all current EL releases (5 and 6) since we need Test::More
65fe75
  version 0.96 or later for the test suite
65fe75
65fe75
* Tue Sep 17 2013 Paul Howarth <paul@city-fan.org> - 0.011-1
65fe75
- Update to 0.011
65fe75
  - More clearly (and correctly) document the way NOT to use Test::Fatal
65fe75
  - Try to fix $TODO not working when the user test uses $T::B::Level
65fe75
- Explicitly run the extra tests
65fe75
- Package examples directory as documentation
65fe75
- Don't need to remove empty directories from the buildroot
65fe75
- Drop %%defattr, redundant since rpm 4.4
65fe75
65fe75
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.010-7
65fe75
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
65fe75
65fe75
* Wed Jul 24 2013 Petr Pisar <ppisar@redhat.com> - 0.010-6
65fe75
- Perl 5.18 rebuild
65fe75
65fe75
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.010-5
65fe75
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
65fe75
65fe75
* Thu Oct 18 2012 Jitka Plesnikova <jplesnik@redhat.com> - 0.010-4
65fe75
- Specify all dependencies
65fe75
65fe75
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.010-3
65fe75
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
65fe75
65fe75
* Mon Jun 11 2012 Petr Pisar <ppisar@redhat.com> - 0.010-2
65fe75
- Perl 5.16 rebuild
65fe75
65fe75
* Thu Feb 16 2012 Paul Howarth <paul@city-fan.org> - 0.010-1
65fe75
- Update to 0.010
65fe75
  - Avoid tickling an overloading bug in perl 5.6 during testing
65fe75
    (CPAN RT#74847)
65fe75
65fe75
* Fri Feb 10 2012 Paul Howarth <paul@city-fan.org> - 0.009-1
65fe75
- Update to 0.009
65fe75
  - Advise against using isnt(exception{...},undef)
65fe75
65fe75
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.008-2
65fe75
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
65fe75
65fe75
* Mon Nov  7 2011 Paul Howarth <paul@city-fan.org> - 0.008-1
65fe75
- Update to 0.008
65fe75
  - Revert the mistake by which 0.004 allowed blocks after "exception" as well
65fe75
    as "success"
65fe75
- BR: perl(Carp)
65fe75
- Update patch for building with ExtUtils::MakeMaker < 6.30
65fe75
65fe75
* Mon Jun 20 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.006-2
65fe75
- Perl mass rebuild
65fe75
65fe75
* Thu Jun  2 2011 Paul Howarth <paul@city-fan.org> - 0.006-1
65fe75
- Update to 0.006
65fe75
  - Crank back the Test::More and Exporter requirements (CPAN RT#62699)
65fe75
  - Add lives_ok and dies_ok emulation (CPAN RT#67598)
65fe75
- Versions patch replaced by workaround for old ExtUtils::MakeMaker
65fe75
- BR: perl(Test::Builder::Tester)
65fe75
65fe75
* Tue Apr 26 2011 Paul Howarth <paul@city-fan.org> - 0.005-1
65fe75
- Update to 0.005
65fe75
  - Fix the logic that picks tests for 5.13.1+
65fe75
65fe75
* Tue Apr 26 2011 Paul Howarth <paul@city-fan.org> - 0.004-1
65fe75
- Update to 0.004
65fe75
  - success blocks now allow trailing blocks like finally, catch, etc.
65fe75
- Remove remaining uses of macros for commands
65fe75
- Re-order %%install section to conventional position in spec
65fe75
65fe75
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.003-2
65fe75
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
65fe75
65fe75
* Fri Oct 29 2010 Paul Howarth <paul@city-fan.org> - 0.003-1
65fe75
- Update to 0.003
65fe75
  - More tests for false exceptions, especially on 5.13
65fe75
- Update versions patch
65fe75
65fe75
* Thu Oct 28 2010 Paul Howarth <paul@city-fan.org> - 0.002-1
65fe75
- Update to 0.002
65fe75
  - Add tests for handling of false exceptions
65fe75
  - Fix precedence error in documentation
65fe75
- Update versions patch
65fe75
65fe75
* Wed Oct 27 2010 Paul Howarth <paul@city-fan.org> - 0.001-2
65fe75
- Sanitize spec for Fedora submission
65fe75
65fe75
* Tue Oct 26 2010 Paul Howarth <paul@city-fan.org> - 0.001-1
65fe75
- Initial RPM version