2009-08-10 17:04:13 +02:00
|
|
|
#
|
2011-03-16 10:38:35 +01:00
|
|
|
# spec file for package perl-Test-NoWarnings
|
2009-08-10 17:04:13 +02:00
|
|
|
#
|
2021-08-03 10:46:55 +02:00
|
|
|
# Copyright (c) 2021 SUSE LLC
|
2009-08-10 17:04:13 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2021-08-03 10:46:55 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2009-08-10 17:04:13 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2021-08-03 10:46:55 +02:00
|
|
|
%define cpan_name Test-NoWarnings
|
2009-08-10 17:04:13 +02:00
|
|
|
Name: perl-Test-NoWarnings
|
2021-08-03 10:46:55 +02:00
|
|
|
Version: 1.06
|
2012-02-20 09:57:11 +01:00
|
|
|
Release: 0
|
2021-08-03 10:46:55 +02:00
|
|
|
#Upstream: LGPL-2.1-or-later
|
2011-09-19 11:25:14 +02:00
|
|
|
Summary: Make sure you didn't emit any warnings while testing
|
2021-08-03 10:46:55 +02:00
|
|
|
License: LGPL-2.1-or-later
|
|
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
|
|
Source0: https://cpan.metacpan.org/authors/id/H/HA/HAARG/%{cpan_name}-%{version}.tar.gz
|
2015-04-17 14:04:39 +02:00
|
|
|
Source1: cpanspec.yml
|
2011-09-19 11:25:14 +02:00
|
|
|
BuildArch: noarch
|
2009-08-10 17:04:13 +02:00
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: perl-macros
|
2015-04-17 14:04:39 +02:00
|
|
|
BuildRequires: perl(Test::Builder) >= 0.86
|
2011-09-19 11:25:14 +02:00
|
|
|
BuildRequires: perl(Test::Tester) >= 0.107
|
|
|
|
Requires: perl(Test::Builder) >= 0.86
|
|
|
|
%{perl_requires}
|
2009-08-10 17:04:13 +02:00
|
|
|
|
|
|
|
%description
|
2011-09-19 11:25:14 +02:00
|
|
|
In general, your tests shouldn't produce warnings. This modules causes any
|
|
|
|
warnings to be captured and stored. It automatically adds an extra test
|
|
|
|
that will run when your script ends to check that there were no warnings.
|
2021-08-03 10:46:55 +02:00
|
|
|
If there were any warnings, the test will give a "not ok" and diagnostics
|
|
|
|
of where, when and what the warning was, including a stack trace of what
|
|
|
|
was going on when the it occurred.
|
2011-09-19 11:25:14 +02:00
|
|
|
|
|
|
|
If some of your tests *are supposed to* produce warnings then you should be
|
2021-08-03 10:46:55 +02:00
|
|
|
capturing and checking them with Test::Warn, that way Test::NoWarnings will
|
|
|
|
not see them and so not complain.
|
2009-08-10 17:04:13 +02:00
|
|
|
|
2012-02-20 09:57:11 +01:00
|
|
|
The test is run by an 'END' block in Test::NoWarnings. It will not be run
|
2011-09-19 11:25:14 +02:00
|
|
|
when any forked children exit.
|
2009-08-10 17:04:13 +02:00
|
|
|
|
|
|
|
%prep
|
2021-08-03 10:46:55 +02:00
|
|
|
%autosetup -n %{cpan_name}-%{version}
|
2009-08-10 17:04:13 +02:00
|
|
|
|
|
|
|
%build
|
2021-08-03 10:46:55 +02:00
|
|
|
perl Makefile.PL INSTALLDIRS=vendor
|
|
|
|
%make_build
|
2009-08-10 17:04:13 +02:00
|
|
|
|
|
|
|
%check
|
2021-08-03 10:46:55 +02:00
|
|
|
make test
|
2009-08-10 17:04:13 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
%perl_make_install
|
|
|
|
%perl_process_packlist
|
|
|
|
%perl_gen_filelist
|
|
|
|
|
|
|
|
%files -f %{name}.files
|
2021-08-03 10:46:55 +02:00
|
|
|
%doc Changes README
|
|
|
|
%license LICENSE
|
2009-08-10 17:04:13 +02:00
|
|
|
|
|
|
|
%changelog
|