]> git.pld-linux.org Git - packages/perl-Test-Cmd.git/blame - perl-Test-Cmd.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/perl-Test-Cmd.git] / perl-Test-Cmd.spec
CommitLineData
0665dafc 1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
4#
5%define pdir Test
6%define pnam Cmd
0665dafc 7Summary: Test::Cmd - Perl module for portable testing of commands and scripts
8#Summary(pl.UTF-8):
9Name: perl-Test-Cmd
10Version: 1.05
11Release: 1
12# same as perl
13License: GPL v1+ or Artistic
14Group: Development/Languages/Perl
15Source0: http://www.cpan.org/modules/by-module/Test/%{pdir}-%{pnam}-%{version}.tar.gz
16# Source0-md5: 462ed981f09e02a5d9bdfb309425ede0
17URL: http://www.baldmt.com/Test-Cmd/
18BuildRequires: perl-devel >= 1:5.8.0
19BuildRequires: rpm-perlprov >= 4.1-13
20BuildArch: noarch
21BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23%description
24The Test::Cmd module provides a low-level framework for portable
25automated testing of executable commands and scripts (in any language,
26not just Perl), especially commands and scripts that interact with the
27file system.
28
29The Test::Cmd module makes no assumptions about what constitutes
30a successful or failed test. Attempting to read a file that doesn't
31exist, for example, may or may not be an error, depending on the
32software being tested.
33
34Consequently, no Test::Cmd methods (including the new() method)
35exit, die or throw any other sorts of exceptions (but they all do
36return useful error indications). Exceptions or other error status
37should be handled by a higher layer: a subclass of Test::Cmd, or
38another testing framework such as the Test or Test::Simple Perl
39modules, or by the test itself.
40
41(That said, see the Test::Cmd::Common module if you want a similar
42module that provides exception handling, either to use directly in
43your own tests, or as an example of how to use Test::Cmd.)
44
45In addition to running tests and evaluating conditions, the Test::Cmd
46module manages and cleans up one or more temporary workspace
47directories, and provides methods for creating files and directories
48in those workspace directories from in-line data (that is,
49here-documents), allowing tests to be completely self-contained. When
50used in conjunction with another testing framework, the Test::Cmd
51module can function as a fixture (common startup code for multiple
52tests) for simple management of command execution and temporary
53workspaces.
54
55# %description -l pl.UTF-8
56# TODO
57
58%prep
59%setup -q -n %{pdir}-%{pnam}-%{version}
60
61%build
62%{__perl} Makefile.PL \
63 INSTALLDIRS=vendor
64%{__make}
65
66%{?with_tests:%{__make} test}
67
68%install
69rm -rf $RPM_BUILD_ROOT
70
71%{__make} pure_install \
72 DESTDIR=$RPM_BUILD_ROOT
73
74%clean
75rm -rf $RPM_BUILD_ROOT
76
77%files
78%defattr(644,root,root,755)
79%doc Changes README
80%{perl_vendorlib}/Test/*.pm
81%{perl_vendorlib}/Test/Cmd
82%{_mandir}/man3/*
This page took 0.130134 seconds and 4 git commands to generate.