82 lines
3.0 KiB
RPMSpec
82 lines
3.0 KiB
RPMSpec
#
|
|
# spec file for package perl-Test-Assertions
|
|
#
|
|
# Copyright (c) 2024 SUSE LLC
|
|
#
|
|
# 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.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define cpan_name Test-Assertions
|
|
Name: perl-Test-Assertions
|
|
Version: 1.54.0
|
|
Release: 0
|
|
# 1.054 -> normalize -> 1.54.0
|
|
%define cpan_version 1.054
|
|
License: (c) BBC 2005. This program is free software; you can redistribute it and/or modify it under the GNU GPL. See the file COPYING in this distribution, or http://www.gnu.org/licenses/gpl.txt
|
|
Summary: Simple set of building blocks for both unit and runtime testing
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/B/BB/BBC/%{cpan_name}-%{cpan_version}.tar.gz
|
|
Source100: README.md
|
|
BuildArch: noarch
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
BuildRequires: perl(Log::Trace)
|
|
Requires: perl(Log::Trace)
|
|
Provides: perl(Test::Assertions) = 1.540.0
|
|
Provides: perl(Test::Assertions::TestScript) = 1.180.0
|
|
%undefine __perllib_provides
|
|
%{perl_requires}
|
|
|
|
%description
|
|
Test::Assertions provides a convenient set of tools for constructing tests,
|
|
such as unit tests or run-time assertion checks (like C's ASSERT macro).
|
|
Unlike some of the Test:: modules available on CPAN, Test::Assertions is
|
|
not limited to unit test scripts; for example it can be used to check
|
|
output is as expected within a benchmarking script. When it is used for
|
|
unit tests, it generates output in the standard form for CPAN unit testing
|
|
(under Test::Harness).
|
|
|
|
The package's import method is used to control the behaviour of ASSERT:
|
|
whether it dies, warns, prints 'ok'/'not ok', or does nothing.
|
|
|
|
In 'test' mode the script also exports plan(), only() and ignore()
|
|
functions. In 'test/ok' mode an ok() function is also exported for
|
|
compatibility with Test/Test::Harness. The plan function attempts to count
|
|
the number of tests if it isn't told a number (this works fine in simple
|
|
test scripts but not in loops/subroutines). In either mode, a warning will
|
|
be emitted if the planned number of tests is not the same as the number of
|
|
tests actually run, e.g.
|
|
|
|
# Looks like you planned 2 tests but actually ran 1.
|
|
|
|
%prep
|
|
%autosetup -n %{cpan_name}-%{cpan_version}
|
|
|
|
%build
|
|
perl Makefile.PL INSTALLDIRS=vendor
|
|
%make_build
|
|
|
|
%check
|
|
make test
|
|
|
|
%install
|
|
%perl_make_install
|
|
%perl_process_packlist
|
|
%perl_gen_filelist
|
|
|
|
%files -f %{name}.files
|
|
%doc Changes README
|
|
%license COPYING
|
|
|
|
%changelog
|