5 Star 0 Fork 3

OpenCloudOS Stream/perl-Test-Warnings

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
perl-Test-Warnings.spec 2.96 KB
一键复制 编辑 原始数据 按行查看 历史
Summary: Test for warnings and the lack of them
Name: perl-Test-Warnings
Version: 0.032
Release: 3%{?dist}
License: GPL+ or Artistic
URL: https://metacpan.org/release/Test-Warnings
Source0: https://cpan.metacpan.org/modules/by-module/Test/Test-Warnings-%{version}.tar.gz
BuildArch: noarch
BuildRequires: make coreutils findutils
BuildRequires: perl-generators perl-interpreter perl(ExtUtils::MakeMaker)
BuildRequires: perl(Carp) perl(Exporter) perl(Test::Builder)
BuildRequires: perl(parent) perl(strict) perl(warnings)
# Test
BuildRequires: perl(File::Spec) perl(if) perl(lib)
BuildRequires: perl(Test::More) >= 0.94
Requires: perl(Carp)
%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.
%prep
%autosetup -n Test-Warnings-%{version}
%build
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
%{make_build}
%install
%{make_install}
%{_fixperms} -c %{buildroot}
%check
make test
%files
%license LICENCE
%doc Changes CONTRIBUTING README examples/
%{perl_vendorlib}/Test/
%{_mandir}/man3/Test::Warnings.3*
%changelog
* Thu Sep 26 2024 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 0.032-3
- Rebuilt for clarifying the packages requirement in BaseOS and AppStream
* Fri Aug 16 2024 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 0.032-2
- Rebuilt for loongarch release
* Wed Jan 03 2024 Upgrade Robot <upbot@opencloudos.org> - 0.032-1
- Upgrade to version 0.032
* Fri Sep 08 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 0.031-5
- Rebuilt for OpenCloudOS Stream 23.09
* Thu Aug 17 2023 Xiaojie Chen <jackxjchen@tencent.com> - 0.031-4
- Remove perl(:MODULE_COMPAT) which will be generated by perl-generators >= 1.15
* Fri Apr 28 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 0.031-3
- Rebuilt for OpenCloudOS Stream 23.05
* Fri Mar 31 2023 OpenCloudOS Release Engineering <releng@opencloudos.tech> - 0.031-2
- Rebuilt for OpenCloudOS Stream 23
* Thu Feb 16 2023 rockerzhu <rockerzhu@tencent.com> - 0.031-1
- Initial build
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/opencloudos-stream/perl-Test-Warnings.git
git@gitee.com:opencloudos-stream/perl-Test-Warnings.git
opencloudos-stream
perl-Test-Warnings
perl-Test-Warnings
master

搜索帮助