3 %bcond_without tests # unit tests
7 Summary: Test::Trap - Trap exit codes, exceptions, output, etc.
8 Summary(pl.UTF-8): Test::Trap - przechwytywanie kodów wyjścia, wyjątków, wyjścia itp.
13 License: GPL v1+ or Artistic
14 Group: Development/Languages/Perl
15 Source0: http://www.cpan.org/modules/by-module/Test/%{pdir}-%{pnam}-v%{version}.tar.gz
16 # Source0-md5: 7cb432fcb7b8f761e9cc2fc12e76b80b
17 URL: https://metacpan.org/release/Test-Trap
18 BuildRequires: perl-Module-Build
19 BuildRequires: perl-devel >= 1:5.8.0
20 BuildRequires: rpm-perlprov >= 4.1-13
21 BuildRequires: rpmbuild(macros) >= 1.745
23 BuildRequires: perl-Data-Dump
24 BuildRequires: perl-Test-Simple
25 BuildRequires: perl-Test-Tester >= 0.107
28 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31 Primarily (but not exclusively) for use in test scripts: A block eval
32 on steroids, configurable and extensible, but by default trapping
33 (Perl) STDOUT, STDERR, warnings, exceptions, would-be exit codes, and
34 return values from boxed blocks of test code.
36 The values collected by the latest trap can then be queried or tested
37 through a special trap object.
39 %description -l pl.UTF-8
40 Moduł przeznaczony głównie (ale nie wyłącznie) do użycia w skryptach
41 testowych: blokowy eval na sterydach, konfigurowalny i rozszerzalny,
42 ale domyślnie przechwytujący (perlowe) STDOUT, STDERR, ostrzeżenia,
43 wyjątki, potencjalne kody wyjścia i wartości zwracane z ograniczonych
44 bloków kodu testowego.
46 Zgromadzone wartości z ostatniej pułapki mogą być następnie odpytywane
47 lub testowane poprzez specjalny obiekt pułapki.
50 %setup -q -n %{pdir}-%{pnam}-v%{version}
54 destdir=$RPM_BUILD_ROOT \
58 %{?with_tests:./Build test}
61 rm -rf $RPM_BUILD_ROOT
66 rm -rf $RPM_BUILD_ROOT
69 %defattr(644,root,root,755)
71 %{perl_vendorlib}/Test/Trap.pm
72 %{perl_vendorlib}/Test/Trap
73 %{_mandir}/man3/Test::Trap*.3pm*