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