[libtest-exception-perl] 01/07: Imported Upstream version 0.35
gregor herrmann
gregoa at debian.org
Tue Oct 14 17:59:36 UTC 2014
This is an automated email from the git hooks/post-receive script.
gregoa pushed a commit to branch master
in repository libtest-exception-perl.
commit 255494e4357275de075a40195bc55df19f98a217
Author: gregor herrmann <gregoa at debian.org>
Date: Tue Oct 14 19:45:39 2014 +0200
Imported Upstream version 0.35
---
Changes | 9 +++++++++
MANIFEST | 2 +-
META.json | 34 +++++++++++++++++-----------------
META.yml | 39 +++++++++++++++++++--------------------
Makefile.PL | 16 ++++++++--------
README | 40 ++++++++++++++++++++--------------------
lib/Test/Exception.pm | 20 ++++++++++++++++++--
7 files changed, 92 insertions(+), 68 deletions(-)
diff --git a/Changes b/Changes
index c3c6bf4..cd4a110 100755
--- a/Changes
+++ b/Changes
@@ -1,5 +1,14 @@
Revision history for Perl extension Test::Exception:
+0.35 [2014-09-20]
+ - Fix a bug when Test::Builder isn't new (better version).
+
+0.34 [2014-09-20]
+ - Fix a bug when Test::Builder isn't new.
+
+0.33 [2014-09-19] Or "Another Test-Simple change"
+ - Fixed test broken by changes in Test::Builder and friends
+
0.32 [2013-04-28] Or the "prepping for upcoming Test::Simple 0.99" release
- Fixed tests that broke due to Test::More diagnostic changes
diff --git a/MANIFEST b/MANIFEST
index 7e4ac67..8bcc196 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -2,7 +2,6 @@ Build.PL
Changes
lib/Test/Exception.pm
MANIFEST This list of files
-README
t/caller.t
t/edge-cases.t
t/Exception.t
@@ -20,5 +19,6 @@ xt/perlcriticrc
xt/pod.t
xt/spelling.t
Makefile.PL
+README
META.yml
META.json
diff --git a/META.json b/META.json
index 4f6ee7e..719b322 100644
--- a/META.json
+++ b/META.json
@@ -1,22 +1,33 @@
{
- "abstract" : "Test exception based code",
+ "abstract" : "unknown",
"author" : [
- "Adrian Howard <adrianh at quietstars.com>"
+ "unknown"
],
"dynamic_config" : 1,
- "generated_by" : "Module::Build version 0.38, CPAN::Meta::Converter version 2.112621",
+ "generated_by" : "ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.140640",
"license" : [
- "perl_5"
+ "unknown"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"version" : "2"
},
"name" : "Test-Exception",
+ "no_index" : {
+ "directory" : [
+ "t",
+ "inc"
+ ]
+ },
"prereqs" : {
+ "build" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0"
+ }
+ },
"configure" : {
"requires" : {
- "Module::Build" : "0.38"
+ "ExtUtils::MakeMaker" : "0"
}
},
"runtime" : {
@@ -30,17 +41,6 @@
}
}
},
- "provides" : {
- "Test::Exception" : {
- "file" : "lib/Test/Exception.pm",
- "version" : "0.32"
- }
- },
"release_status" : "stable",
- "resources" : {
- "license" : [
- "http://dev.perl.org/licenses/"
- ]
- },
- "version" : "0.32"
+ "version" : "0.35"
}
diff --git a/META.yml b/META.yml
index dc0203c..793e635 100644
--- a/META.yml
+++ b/META.yml
@@ -1,28 +1,27 @@
---
-abstract: 'Test exception based code'
+abstract: unknown
author:
- - 'Adrian Howard <adrianh at quietstars.com>'
-build_requires: {}
+ - unknown
+build_requires:
+ ExtUtils::MakeMaker: '0'
configure_requires:
- Module::Build: 0.38
+ ExtUtils::MakeMaker: '0'
dynamic_config: 1
-generated_by: 'Module::Build version 0.38, CPAN::Meta::Converter version 2.112621'
-license: perl
+generated_by: 'ExtUtils::MakeMaker version 6.98, CPAN::Meta::Converter version 2.140640'
+license: unknown
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ version: '1.4'
name: Test-Exception
-provides:
- Test::Exception:
- file: lib/Test/Exception.pm
- version: 0.32
+no_index:
+ directory:
+ - t
+ - inc
requires:
- Sub::Uplevel: 0.18
- Test::Builder: 0.7
- Test::Builder::Tester: 1.07
- Test::Harness: 2.03
- Test::More: 0.7
- Test::Simple: 0.7
-resources:
- license: http://dev.perl.org/licenses/
-version: 0.32
+ Sub::Uplevel: '0.18'
+ Test::Builder: '0.7'
+ Test::Builder::Tester: '1.07'
+ Test::Harness: '2.03'
+ Test::More: '0.7'
+ Test::Simple: '0.7'
+version: '0.35'
diff --git a/Makefile.PL b/Makefile.PL
index cd3d074..706b341 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,19 +1,19 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.3800
+# Note: this file was auto-generated by Module::Build::Compat version 0.4206
use ExtUtils::MakeMaker;
WriteMakefile
(
'NAME' => 'Test::Exception',
- 'VERSION_FROM' => 'lib/Test/Exception.pm',
+ 'PL_FILES' => {},
+ 'INSTALLDIRS' => 'site',
'PREREQ_PM' => {
- 'Sub::Uplevel' => '0.18',
'Test::Builder' => '0.7',
- 'Test::Builder::Tester' => '1.07',
'Test::Harness' => '2.03',
'Test::More' => '0.7',
- 'Test::Simple' => '0.7'
+ 'Test::Builder::Tester' => '1.07',
+ 'Test::Simple' => '0.7',
+ 'Sub::Uplevel' => '0.18'
},
- 'INSTALLDIRS' => 'site',
- 'EXE_FILES' => [],
- 'PL_FILES' => {}
+ 'VERSION_FROM' => 'lib/Test/Exception.pm',
+ 'EXE_FILES' => []
)
;
diff --git a/README b/README
index cca1eee..4176b45 100644
--- a/README
+++ b/README
@@ -48,8 +48,8 @@ DESCRIPTION
If you are not already familiar with Test::More now would be the time to
go take a look.
- You can specify the test plan when you `use Test::Exception' in the same
- way as `use Test::More'. See Test::More for details.
+ You can specify the test plan when you "use Test::Exception" in the same
+ way as "use Test::More". See Test::More for details.
NOTE: Test::Exception only checks for exceptions. It will ignore other
methods of stopping program execution - including exit(). If you have an
@@ -68,7 +68,7 @@ DESCRIPTION
throws_ok { read_file( 'unreadable' ) } qr/No file/, 'no file';
- If your perl does not support `qr//' you can also pass a regex-like
+ If your perl does not support "qr//" you can also pass a regex-like
string, for example:
throws_ok { read_file( 'unreadable' ) } '/No file/', 'no file';
@@ -79,7 +79,7 @@ DESCRIPTION
throws_ok { $foo->bar } "Error::Simple", 'simple error';
- Will only pass if the `bar' method throws an Error::Simple
+ Will only pass if the "bar" method throws an Error::Simple
exception, or a subclass of an Error::Simple exception.
You can get the same effect by passing an instance of the exception
@@ -108,7 +108,7 @@ DESCRIPTION
A description of the exception being checked is used if no optional
test description is passed.
- NOTE: Rememeber when you `die $string_without_a_trailing_newline'
+ NOTE: Rememeber when you "die $string_without_a_trailing_newline"
perl will automatically add the current script line number, input
line number and a newline. This will form part of the string that
throws_ok regular expressions match against.
@@ -185,7 +185,7 @@ DESCRIPTION
is read_file('answer.txt'), "42\n", 'answer is 42';
- unless `read_file('answer.txt')' dies, in which case you get the
+ unless "read_file('answer.txt')" dies, in which case you get the
same kind of error as lives_ok()
not ok 1 - answer is 42
@@ -215,49 +215,49 @@ SKIPPING TEST::EXCEPTION TESTS
plan tests => 2;
# ... tests that need Test::Exception ...
- Note that we load Test::Exception in a `BEGIN' block ensuring that the
+ Note that we load Test::Exception in a "BEGIN" block ensuring that the
subroutine prototypes are in place before the rest of the test script is
compiled.
BUGS
There are some edge cases in Perl's exception handling where
Test::Exception will miss exceptions thrown in DESTROY blocks. See the
- RT bug http://rt.cpan.org/Ticket/Display.html?id=24678 for details,
+ RT bug <http://rt.cpan.org/Ticket/Display.html?id=24678> for details,
along with the t/edge-cases.t in the distribution test suite. These will
be addressed in a future Test::Exception release.
If you find any more bugs please let me know by e-mail, or report the
- problem with http://rt.cpan.org/.
+ problem with <http://rt.cpan.org/>.
COMMUNITY
perl-qa
If you are interested in testing using Perl I recommend you visit
- http://qa.perl.org/ and join the excellent perl-qa mailing list. See
- http://lists.perl.org/showlist.cgi?name=perl-qa for details on how
- to subscribe.
+ <http://qa.perl.org/> and join the excellent perl-qa mailing list.
+ See <http://lists.perl.org/showlist.cgi?name=perl-qa> for details on
+ how to subscribe.
perlmonks
You can find users of Test::Exception, including the module author,
- on http://www.perlmonks.org/. Feel free to ask questions on
+ on <http://www.perlmonks.org/>. Feel free to ask questions on
Test::Exception there.
CPAN::Forum
The CPAN Forum is a web forum for discussing Perl's CPAN modules.
The Test::Exception forum can be found at
- http://www.cpanforum.com/dist/Test-Exception.
+ <http://www.cpanforum.com/dist/Test-Exception>.
AnnoCPAN
AnnoCPAN is a web site that allows community annotations of Perl
module documentation. The Test::Exception annotations can be found
- at http://annocpan.org/~ADIE/Test-Exception/.
+ at <http://annocpan.org/~ADIE/Test-Exception/>.
TO DO
If you think this module should do something that it doesn't (or does
something that it shouldn't) please let me know.
You can see my current to do list at
- http://adrianh.tadalist.com/lists/public/15421, with an RSS feed of
- changes at http://adrianh.tadalist.com/lists/feed_public/15421.
+ <http://adrianh.tadalist.com/lists/public/15421>, with an RSS feed of
+ changes at <http://adrianh.tadalist.com/lists/feed_public/15421>.
ACKNOWLEDGMENTS
Thanks to chromatic and Michael G Schwern for the excellent
@@ -279,7 +279,7 @@ AUTHOR
useful.
SEE ALSO
- http://del.icio.us/tag/Test::Exception
+ <http://del.icio.us/tag/Test::Exception>
Delicious links on Test::Exception.
Test::Warn & Test::NoWarnings
@@ -291,10 +291,10 @@ SEE ALSO
Test::Simple & Test::More
Basic utilities for writing tests.
- http://qa.perl.org/test-modules.html
+ <http://qa.perl.org/test-modules.html>
Overview of some of the many testing modules available on CPAN.
- http://del.icio.us/tag/perl+testing
+ <http://del.icio.us/tag/perl+testing>
Delicious links on perl testing.
LICENCE
diff --git a/lib/Test/Exception.pm b/lib/Test/Exception.pm
index 5cbd88e..a9d0aa5 100644
--- a/lib/Test/Exception.pm
+++ b/lib/Test/Exception.pm
@@ -6,7 +6,7 @@ use Test::Builder;
use Sub::Uplevel qw( uplevel );
use base qw( Exporter );
-our $VERSION = '0.32';
+our $VERSION = '0.35';
our @EXPORT = qw(dies_ok lives_ok throws_ok lives_and);
my $Tester = Test::Builder->new;
@@ -332,9 +332,25 @@ The test description is optional, but recommended.
=cut
+my $is_stream = eval { require Test::Stream; require Test::Stream::Event::Ok; 1 };
+our $LIVES_AND_NAME;
+if ($is_stream) {
+ Test::Stream->shared->munge(sub {
+ return unless defined $LIVES_AND_NAME;
+ my ($stream, $e) = @_;
+ return unless $e->isa('Test::Stream::Event::Ok');
+ return if defined $e->name;
+ $e->set_name($LIVES_AND_NAME);
+ });
+}
+
sub lives_and (&;$) {
my ( $test, $description ) = @_;
- {
+ if ($is_stream) {
+ local $LIVES_AND_NAME = $description;
+ eval { $test->() } and return 1;
+ }
+ else {
local $Test::Builder::Level = $Test::Builder::Level + 1;
my $ok = \&Test::Builder::ok;
no warnings;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libtest-exception-perl.git
More information about the Pkg-perl-cvs-commits
mailing list