8
0

- updated to 1.001002

* restore ability to use regex with test_err and test_out
      (Zefram) [rt.cpan.org #89655] [github #389] [github #387]
    Bug Fixes
    * Fix precedence error with (return ... and ...)
      (nthykier) [github #385]
    Doc Changes
    * Add a shorter work around for the UTF-8 output problem.
      (Michael G Schwern)
    Bug Fixes
    * Test::Builder::Tester now works with subtests.
      (Michael G Schwern) [github 350]
    * Fix test_fail() inside a do statement.
      (nnutter) [github #369]
    New Features
    * A subtest will put its name at the front of its results to make
      subtests easier to read. [github #290] [github #364]
      (Brendan Byrd)
    Feature Changes
    * like() and unlike() no longer warn about undef. [github #335]
      (Michael G Schwern)

OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Test-Simple?expand=0&rev=23
This commit is contained in:
Stephan Kulow
2013-12-10 06:35:36 +00:00
committed by Git OBS Bridge
parent 77b32ca1fb
commit 0d7984a858
4 changed files with 112 additions and 31 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2fb203e2cb75e72c6f70af71c6b01998f2c0ec2afba6c38cc5053c6107cd12a8
size 107255

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:0cd3bcdb030f17a824bb35916b8200f3aa77530c6833c81b9a0e275ebfa9374c
size 112428

View File

@@ -1,3 +1,33 @@
-------------------------------------------------------------------
Tue Dec 10 06:33:29 UTC 2013 - coolo@suse.com
- updated to 1.001002
* restore ability to use regex with test_err and test_out
(Zefram) [rt.cpan.org #89655] [github #389] [github #387]
Bug Fixes
* Fix precedence error with (return ... and ...)
(nthykier) [github #385]
Doc Changes
* Add a shorter work around for the UTF-8 output problem.
(Michael G Schwern)
Bug Fixes
* Test::Builder::Tester now works with subtests.
(Michael G Schwern) [github 350]
* Fix test_fail() inside a do statement.
(nnutter) [github #369]
New Features
* A subtest will put its name at the front of its results to make
subtests easier to read. [github #290] [github #364]
(Brendan Byrd)
Feature Changes
* like() and unlike() no longer warn about undef. [github #335]
(Michael G Schwern)
-------------------------------------------------------------------
Fri Nov 18 11:10:18 UTC 2011 - coolo@suse.com

View File

@@ -1,7 +1,7 @@
#
# spec file for package perl-Test-Simple
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -16,42 +16,96 @@
#
%bcond_with pod
Name: perl-Test-Simple
%define cpan_name Test-Simple
Summary: Basic utilities for writing tests
License: GPL-1.0+ or Artistic-1.0
Group: Development/Libraries/Perl
Version: 0.98
Version: 1.001002
Release: 0
%define cpan_name Test-Simple
Summary: Basic utilities for writing tests.
License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/Test-Simple/
#Source: http://www.cpan.org/modules/by-module/Test/Test-Simple-%{version}.tar.gz
Source: %{cpan_name}-%{version}.tar.gz
Source: http://www.cpan.org/authors/id/R/RJ/RJBS/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{perl_requires}
BuildRequires: perl
%if 0%{?fedora}
BuildRequires: perl-devel
%endif
BuildRequires: perl-macros
%if %{with pod}
BuildRequires: perl(Test::Pod) >= 1.00
BuildRequires: perl(Test::Pod::Coverage) >= 1.08
%endif
BuildRequires: perl(Test::Harness) >= 2.03
Requires: perl(Test::Harness) >= 2.03
#BuildRequires: perl(Dev::Null)
#BuildRequires: perl(MyOverload)
#BuildRequires: perl(Test::Builder::IO::Scalar)
#BuildRequires: perl(Test::Builder::NoOutput)
#BuildRequires: perl(Test::Simple::Catch)
#BuildRequires: perl(TieOut)
%{perl_requires}
%description
** If you are unfamiliar with testing *read Test::Tutorial* first! **
This is an extremely simple, extremely basic module for writing tests
suitable for CPAN modules and other pursuits. If you wish to do more
complicated testing, use the Test::More module (a drop-in replacement for
this one).
Authors:
--------
Michael G Schwern <schwern@pobox.com>
The basic unit of Perl testing is the ok. For each thing you want to test
your program will print out an "ok" or "not ok" to indicate pass or fail.
You do this with the ok() function (see below).
The only other constraint is you must pre-declare how many tests you plan
to run. This is in case something goes horribly wrong during the test and
your test program aborts, or skips a test or whatever. You do this like so:
use Test::Simple tests => 23;
You must have a plan.
* *ok*
ok( $foo eq $bar, $name );
ok( $foo eq $bar );
ok() is given an expression (in this case '$foo eq $bar'). If it's true,
the test passed. If it's false, it didn't. That's about it.
ok() prints out either "ok" or "not ok" along with a test number (it
keeps track of that for you).
# This produces "ok 1 - Hell not yet frozen over" (or not ok)
ok( get_temperature($hell) > 0, 'Hell not yet frozen over' );
If you provide a $name, that will be printed along with the "ok/not ok"
to make it easier to find your test when if fails (just search for the
name). It also makes it easier for the next guy to understand what your
test is for. It's highly recommended you use test names.
All tests are run in scalar context. So this:
ok( @stuff, 'I have some stuff' );
will do what you mean (fail if stuff is empty)
Test::Simple will start by printing number of tests run in the form "1..M"
(so "1..5" means you're going to run 5 tests). This strange format lets
Test::Harness know how many tests you plan on running in case something
goes horribly wrong.
If all your tests passed, Test::Simple will exit with zero (which is
normal). If anything failed it will exit with how many failed. If you run
less (or more) tests than you planned, the missing (or extras) will be
considered failures. If no tests were ever run Test::Simple will throw a
warning and exit with 255. If the test died, even after having successfully
completed all its tests, it will still be considered a failure and will
exit with 255.
So the exit codes are...
0 all tests successful
255 test died or all passed but wrong # of tests run
any other number how many failed (including missing or extras)
If you fail more than 254 tests, it will be reported as 254.
This module is by no means trying to be a complete testing system. It's
just to get you started. Once you're off the ground its recommended you
look at the Test::More manpage.
%prep
%setup -q -n %{cpan_name}-%{version}
@@ -68,11 +122,8 @@ Authors:
%perl_process_packlist
%perl_gen_filelist
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%files -f %{name}.files
%defattr(-,root,root,-)
%doc Changes README TODO examples
%defattr(-,root,root,755)
%doc Changes examples README TODO
%changelog