[packages/perl-Test-Warnings] - new

baggins baggins at pld-linux.org
Sun Jan 26 00:17:28 CET 2014


commit de52701a567eb4a8bbcad7bd5111019778d37b92
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Jan 26 00:17:14 2014 +0100

    - new

 perl-Test-Warnings.spec | 86 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 86 insertions(+)
---
diff --git a/perl-Test-Warnings.spec b/perl-Test-Warnings.spec
new file mode 100644
index 0000000..f2efa26
--- /dev/null
+++ b/perl-Test-Warnings.spec
@@ -0,0 +1,86 @@
+#
+# Conditional build:
+%bcond_without	tests		# do not perform "make test"
+#
+%define		pdir	Test
+%define		pnam	Warnings
+%include	/usr/lib/rpm/macros.perl
+Summary:	Test::Warnings - Test for warnings and the lack of them
+#Summary(pl.UTF-8):	
+Name:		perl-Test-Warnings
+Version:	0.013
+Release:	1
+# same as perl
+License:	GPL v1+ or Artistic
+Group:		Development/Languages/Perl
+Source0:	http://www.cpan.org/modules/by-module/Test/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5:	417033144b2fc373830a3547e9f96fab
+URL:		http://search.cpan.org/dist/Test-Warnings/
+BuildRequires:	perl-Module-Build-Tiny
+BuildRequires:	perl-devel >= 1:5.8.0
+BuildRequires:	rpm-perlprov >= 4.1-13
+%if %{with tests}
+BuildRequires:	perl-Test-Tester >= 0.108
+BuildRequires:	perl-Test-Deep
+%endif
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+If you've ever tried to use Test::NoWarnings to confirm there are no warnings
+generated by your tests, combined with the convenience of done_testing to
+not have to declare a
+test count,
+you'll have discovered that these two features do not play well together,
+as the test count will be calculated before the warnings test is run,
+resulting in a TAP error. (See examples/test_nowarnings.pl in this
+distribution for a demonstration.)
+
+This module is intended to be used as a drop-in replacement for
+Test::NoWarnings: it also adds an extra test, but runs this test before
+done_testing calculates the test count, rather than after.  It does this by
+hooking into done_testing as well as via an END block.  You can declare
+a plan, or not, and things will still Just Work.
+
+It is actually equivalent to:
+
+    use Test::NoWarnings 1.04 ':early';
+
+as warnings are still printed normally as they occur.  You are safe, and
+enthusiastically encouraged, to perform a global search-replace of the above
+with use Test::Warnings; whether or not your tests have a plan.
+
+
+
+# %description -l pl.UTF-8
+# TODO
+
+%prep
+%setup -q -n %{pdir}-%{pnam}-%{version}
+
+%build
+%{__perl} Build.PL \
+	--installdirs=vendor
+./Build
+
+%{?with_tests:./Build test}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+./Build install \
+	--destdir=$RPM_BUILD_ROOT \
+	--create_packlist=0
+
+install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc Changes INSTALL README
+%{perl_vendorlib}/Test/Warnings.pm
+%{_mandir}/man3/*
+%{_examplesdir}/%{name}-%{version}
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/perl-Test-Warnings.git/commitdiff/de52701a567eb4a8bbcad7bd5111019778d37b92



More information about the pld-cvs-commit mailing list