Hello community,
here is the log from the commit of package perl-Test-Exception for
openSUSE:Factory checked in at 2016-01-04 09:20:43
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Test-Exception (Old)
and /work/SRC/openSUSE:Factory/.perl-Test-Exception.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Test-Exception"
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Test-Exception/perl-Test-Exception.changes
2015-06-11 09:09:27.000000000 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Test-Exception.new/perl-Test-Exception.changes
2016-01-04 09:21:04.000000000 +0100
@@ -1,0 +2,15 @@
+Sat Jan 2 10:16:17 UTC 2016 - [email protected]
+
+- updated to 0.43
+ see /usr/share/doc/packages/perl-Test-Exception/Changes
+
+-------------------------------------------------------------------
+Sat Dec 26 10:16:52 UTC 2015 - [email protected]
+
+- updated to 0.41
+ see /usr/share/doc/packages/perl-Test-Exception/Changes
+
+ 0.40 [2015-12-21]
+ - Updated for Test2
+
+-------------------------------------------------------------------
Old:
----
Test-Exception-0.40.tar.gz
New:
----
Test-Exception-0.43.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Test-Exception.spec ++++++
--- /var/tmp/diff_new_pack.iwYHi9/_old 2016-01-04 09:21:05.000000000 +0100
+++ /var/tmp/diff_new_pack.iwYHi9/_new 2016-01-04 09:21:05.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package perl-Test-Exception
#
-# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,10 +17,10 @@
Name: perl-Test-Exception
-Version: 0.400000
+Version: 0.430000
Release: 0
-%define cpan_version 0.40
-Provides: perl(Test::Exception) = 0.400000
+%define cpan_version 0.43
+Provides: perl(Test::Exception) = 0.430000
%define cpan_name Test-Exception
Summary: Test exception-based code
License: Artistic-1.0 or GPL-1.0+
@@ -43,85 +43,85 @@
%description
This module provides a few convenience methods for testing exception based
-code. It is built with the Test::Builder manpage and plays happily with the
-Test::More manpage and friends.
+code. It is built with Test::Builder and plays happily with Test::More and
+friends.
-If you are not already familiar with the Test::More manpage now would be
-the time to go take a look.
+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 the Test::More manpage for details.
+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
exit() in evalled code Test::Exception will not catch this with any of its
testing functions.
-NOTE: This module uses the Sub::Uplevel manpage and relies on overriding
+NOTE: This module uses Sub::Uplevel and relies on overriding
'CORE::GLOBAL::caller' to hide your test blocks from the call stack. If
-this use of global overrides concerns you, the the Test::Fatal manpage
-module offers a more minimalist alternative.
+this use of global overrides concerns you, the Test::Fatal module offers a
+more minimalist alternative.
* *throws_ok*
- Tests to see that a specific exception is thrown. throws_ok() has two
- forms:
+Tests to see that a specific exception is thrown. throws_ok() has two
+forms:
throws_ok BLOCK REGEX, TEST_DESCRIPTION
throws_ok BLOCK CLASS, TEST_DESCRIPTION
- In the first form the test passes if the stringified exception matches
- the give regular expression. For example:
+In the first form the test passes if the stringified exception matches the
+give regular expression. For example:
throws_ok { read_file( 'unreadable' ) } qr/No file/, 'no file';
- If your perl does not support 'qr//' you can also pass a regex-like
- string, for example:
+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';
- The second form of throws_ok() test passes if the exception is of the
- same class as the one supplied, or a subclass of that class. For example:
+The second form of throws_ok() test passes if the exception is of the same
+class as the one supplied, or a subclass of that class. For example:
throws_ok { $foo->bar } "Error::Simple", 'simple error';
- Will only pass if the 'bar' method throws an Error::Simple exception, or
- a subclass of an Error::Simple exception.
+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 you
- want to look for. The following is equivalent to the previous example:
+You can get the same effect by passing an instance of the exception you
+want to look for. The following is equivalent to the previous example:
my $SIMPLE = Error::Simple->new;
throws_ok { $foo->bar } $SIMPLE, 'simple error';
- Should a throws_ok() test fail it produces appropriate diagnostic
- messages. For example:
+Should a throws_ok() test fail it produces appropriate diagnostic messages.
+For example:
not ok 3 - simple error
# Failed test (test.t at line 48)
# expecting: Error::Simple exception
# found: normal exit
- Like all other Test::Exception functions you can avoid prototypes by
- passing a subroutine explicitly:
+Like all other Test::Exception functions you can avoid prototypes by
+passing a subroutine explicitly:
throws_ok( sub {$foo->bar}, "Error::Simple", 'simple error' );
- A true value is returned if the test succeeds, false otherwise. On exit
- $@ is guaranteed to be the cause of death (if any).
+A true value is returned if the test succeeds, false otherwise. On exit $@
+is guaranteed to be the cause of death (if any).
- A description of the exception being checked is used if no optional test
- description is passed.
+A description of the exception being checked is used if no optional test
+description is passed.
- NOTE: Remember 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.
+NOTE: Remember 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.
* *dies_ok*
- Checks that a piece of code dies, rather than returning normally. For
- example:
+Checks that a piece of code dies, rather than returning normally. For
+example:
sub div {
my ( $a, $b ) = @_;
@@ -133,20 +133,20 @@
# or if you don't like prototypes
dies_ok( sub { div( 1, 0 ) }, 'divide by zero detected' );
- A true value is returned if the test succeeds, false otherwise. On exit
- $@ is guaranteed to be the cause of death (if any).
+A true value is returned if the test succeeds, false otherwise. On exit $@
+is guaranteed to be the cause of death (if any).
- Remember: This test will pass if the code dies for any reason. If you
- care about the reason it might be more sensible to write a more specific
- test using throws_ok().
+Remember: This test will pass if the code dies for any reason. If you care
+about the reason it might be more sensible to write a more specific test
+using throws_ok().
- The test description is optional, but recommended.
+The test description is optional, but recommended.
* *lives_ok*
- Checks that a piece of code doesn't die. This allows your test script to
- continue, rather than aborting if you get an unexpected exception. For
- example:
+Checks that a piece of code doesn't die. This allows your test script to
+continue, rather than aborting if you get an unexpected exception. For
+example:
sub read_file {
my $file = shift;
@@ -162,51 +162,51 @@
# or if you don't like prototypes
lives_ok( sub { $file = read_file('test.txt') }, 'file read' );
- Should a lives_ok() test fail it produces appropriate diagnostic
- messages. For example:
+Should a lives_ok() test fail it produces appropriate diagnostic messages.
+For example:
not ok 1 - file read
# Failed test (test.t at line 15)
# died: open failed (No such file or directory)
- A true value is returned if the test succeeds, false otherwise. On exit
- $@ is guaranteed to be the cause of death (if any).
+A true value is returned if the test succeeds, false otherwise. On exit $@
+is guaranteed to be the cause of death (if any).
- The test description is optional, but recommended.
+The test description is optional, but recommended.
* *lives_and*
- Run a test that may throw an exception. For example, instead of doing:
+Run a test that may throw an exception. For example, instead of doing:
my $file;
lives_ok { $file = read_file('answer.txt') } 'read_file worked';
is $file, "42", 'answer was 42';
- You can use lives_and() like this:
+You can use lives_and() like this:
lives_and { is read_file('answer.txt'), "42" } 'answer is 42';
# or if you don't like prototypes
lives_and(sub {is read_file('answer.txt'), "42"}, 'answer is 42');
- Which is the same as doing
+Which is the same as doing
is read_file('answer.txt'), "42\n", 'answer is 42';
- unless 'read_file('answer.txt')' dies, in which case you get the same
- kind of error as lives_ok()
+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
# Failed test (test.t at line 15)
# died: open failed (No such file or directory)
- A true value is returned if the test succeeds, false otherwise. On exit
- $@ is guaranteed to be the cause of death (if any).
+A true value is returned if the test succeeds, false otherwise. On exit $@
+is guaranteed to be the cause of death (if any).
- The test description is optional, but recommended.
+The test description is optional, but recommended.
%prep
%setup -q -n %{cpan_name}-%{cpan_version}
-find . -type f -print0 | xargs -0 chmod 644
+find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
++++++ Test-Exception-0.40.tar.gz -> Test-Exception-0.43.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Exception-0.40/Changes
new/Test-Exception-0.43/Changes
--- old/Test-Exception-0.40/Changes 2015-06-06 05:32:46.000000000 +0200
+++ new/Test-Exception-0.43/Changes 2015-12-29 20:53:41.000000000 +0100
@@ -1,5 +1,16 @@
Revision history for Perl extension Test::Exception:
+0.43 [2015-12-28]
+
+ - No Changes from developer build 0.42_1
+
+0.42_1 [2015-12-28]
+
+ - Remove Test2/Test-Stream special cases, they are not needed
+
+0.41 [2015-12-21]
+ - Updated for Test2
+
0.40 [2015-06-05]
- Updated for changes in Test::Stream (Use Test::Stream::Sync)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Exception-0.40/MANIFEST.SKIP
new/Test-Exception-0.43/MANIFEST.SKIP
--- old/Test-Exception-0.40/MANIFEST.SKIP 2015-06-06 05:32:38.000000000
+0200
+++ new/Test-Exception-0.43/MANIFEST.SKIP 2015-12-29 06:45:24.000000000
+0100
@@ -1,4 +1,70 @@
-#!include_default
+
+#!start included
/home/exodist/perl5/perlbrew/perls/main/lib/5.22.1/ExtUtils/MANIFEST.SKIP
+# Avoid version control files.
+\bRCS\b
+\bCVS\b
+\bSCCS\b
+,v$
+\B\.svn\b
+\B\.git\b
+\B\.gitignore\b
+\b_darcs\b
+\B\.cvsignore$
+
+# Avoid VMS specific MakeMaker generated files
+\bDescrip.MMS$
+\bDESCRIP.MMS$
+\bdescrip.mms$
+
+# Avoid Makemaker generated and utility files.
+\bMANIFEST\.bak
+\bMakefile$
+\bblib/
+\bMakeMaker-\d
+\bpm_to_blib\.ts$
+\bpm_to_blib$
+\bblibdirs\.ts$ # 6.18 through 6.25 generated this
+\b_eumm/ # 7.05_05 and above
+
+# Avoid Module::Build generated and utility files.
+\bBuild$
+\b_build/
+\bBuild.bat$
+\bBuild.COM$
+\bBUILD.COM$
+\bbuild.com$
+
+# and Module::Build::Tiny generated files
+\b_build_params$
+
+# Avoid temp and backup files.
+~$
+\.old$
+\#$
+\b\.#
+\.bak$
+\.tmp$
+\.#
+\.rej$
+\..*\.sw.?$
+
+# Avoid OS-specific files/dirs
+# Mac OSX metadata
+\B\.DS_Store
+# Mac OSX SMB mount metadata files
+\B\._
+
+# Avoid Devel::Cover and Devel::CoverX::Covered files.
+\bcover_db\b
+\bcovered\b
+
+# Avoid prove files
+\B\.prove$
+
+# Avoid MYMETA files
+^MYMETA\.
+#!end included
/home/exodist/perl5/perlbrew/perls/main/lib/5.22.1/ExtUtils/MANIFEST.SKIP
+
.ackrc
Test-Exception-.*/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Exception-0.40/META.json
new/Test-Exception-0.43/META.json
--- old/Test-Exception-0.40/META.json 2015-06-06 05:33:15.000000000 +0200
+++ new/Test-Exception-0.43/META.json 2015-12-29 20:54:12.000000000 +0100
@@ -4,7 +4,7 @@
"Adrian Howard <[email protected]>"
],
"dynamic_config" : 0,
- "generated_by" : "ExtUtils::MakeMaker version 7.04, CPAN::Meta::Converter
version 2.150001",
+ "generated_by" : "ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter
version 2.150001",
"license" : [
"perl_5"
],
@@ -58,7 +58,7 @@
"web" : "https://github.com/Test-More/test-exception"
}
},
- "version" : "0.40",
+ "version" : "0.43",
"x_IRC" : "irc://irc.perl.org/#perl-qa",
"x_MailingList" : "http://lists.perl.org/list/perl-qa.html",
"x_authority" : "cpan:ADIE"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Exception-0.40/META.yml
new/Test-Exception-0.43/META.yml
--- old/Test-Exception-0.40/META.yml 2015-06-06 05:33:15.000000000 +0200
+++ new/Test-Exception-0.43/META.yml 2015-12-29 20:54:12.000000000 +0100
@@ -8,7 +8,7 @@
configure_requires:
ExtUtils::MakeMaker: '0'
dynamic_config: 0
-generated_by: 'ExtUtils::MakeMaker version 7.04, CPAN::Meta::Converter version
2.150001'
+generated_by: 'ExtUtils::MakeMaker version 7.0401, CPAN::Meta::Converter
version 2.150001'
license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -33,7 +33,7 @@
bugtracker: https://github.com/Test-More/test-exception/issues
homepage: https://github.com/Test-More/test-exception
repository: https://github.com/Test-More/test-exception.git
-version: '0.40'
+version: '0.43'
x_IRC: irc://irc.perl.org/#perl-qa
x_MailingList: http://lists.perl.org/list/perl-qa.html
x_authority: cpan:ADIE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Exception-0.40/lib/Test/Exception.pm
new/Test-Exception-0.43/lib/Test/Exception.pm
--- old/Test-Exception-0.40/lib/Test/Exception.pm 2015-06-06
05:32:46.000000000 +0200
+++ new/Test-Exception-0.43/lib/Test/Exception.pm 2015-12-29
20:53:49.000000000 +0100
@@ -6,7 +6,9 @@
use Sub::Uplevel qw( uplevel );
use base qw( Exporter );
-our $VERSION = '0.40';
+our $VERSION = '0.43';
+$VERSION = eval $VERSION;
+
our @EXPORT = qw(dies_ok lives_ok throws_ok lives_and);
my $Tester = Test::Builder->new;
@@ -214,11 +216,11 @@
sub throws_ok (&$;$) {
my ( $coderef, $expecting, $description ) = @_;
unless (defined $expecting) {
- require Carp;
- Carp::croak( "throws_ok: must pass exception class/object or regex" );
+ require Carp;
+ Carp::croak( "throws_ok: must pass exception class/object or regex" );
}
$description = _exception_as_string( "threw", $expecting )
- unless defined $description;
+ unless defined $description;
my $exception = _try_as_caller( $coderef );
my $regex = $Tester->maybe_regex( $expecting );
my $ok = $regex
@@ -301,7 +303,7 @@
my ( $coderef, $description ) = @_;
my $exception = _try_as_caller( $coderef );
my $ok = $Tester->ok( ! _is_exception( $exception ), $description );
- $Tester->diag( _exception_as_string( "died:", $exception ) ) unless $ok;
+ $Tester->diag( _exception_as_string( "died:", $exception ) ) unless $ok;
$@ = $exception;
return $ok;
}
@@ -337,29 +339,13 @@
=cut
-my $is_stream = $INC{'Test/Stream/Sync.pm'};
-our $LIVES_AND_NAME;
-if ($is_stream) {
- Test::Stream::Sync->stack->top->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;
local *Test::Builder::ok = sub {
+ local $Test::Builder::Level = $Test::Builder::Level + 1;
$_[2] = $description unless defined $_[2];
$ok->(@_);
};
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Exception-0.40/t/edge-cases.t
new/Test-Exception-0.43/t/edge-cases.t
--- old/Test-Exception-0.40/t/edge-cases.t 2015-06-04 16:57:46.000000000
+0200
+++ new/Test-Exception-0.43/t/edge-cases.t 2015-12-29 06:45:24.000000000
+0100
@@ -1,5 +1,3 @@
-#! /usr/bin/perl
-
use strict;
use warnings;
use Test::More skip_all => 'stuff relating to RT#24678 that I have not fixed
yet';
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Exception-0.40/t/lives_and.t
new/Test-Exception-0.43/t/lives_and.t
--- old/Test-Exception-0.40/t/lives_and.t 2015-06-05 07:44:45.000000000
+0200
+++ new/Test-Exception-0.43/t/lives_and.t 2015-12-29 06:55:46.000000000
+0100
@@ -5,10 +5,13 @@
use Test::Builder::Tester tests => 3;
use Test::More;
+diag "\$Test::More::VERSION = $Test::More::VERSION";
+
BEGIN { use_ok( 'Test::Exception' ) };
sub works {return shift};
sub dies { die 'oops' };
+my $die_line = __LINE__ - 1;
my $filename = sub { return (caller)[1] }->();
@@ -22,7 +25,7 @@
test_out('not ok 2 - lives_and, exception');
test_fail(+2);
-test_err("# died: oops at $filename line 11.");
+test_err("# died: oops at $filename line $die_line.");
lives_and {is dies(42), 42} 'lives_and, exception';
test_out('ok 3 - the test passed' );
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Test-Exception-0.40/t/rt.t
new/Test-Exception-0.43/t/rt.t
--- old/Test-Exception-0.40/t/rt.t 2015-06-04 16:57:46.000000000 +0200
+++ new/Test-Exception-0.43/t/rt.t 2015-12-29 06:45:24.000000000 +0100
@@ -1,5 +1,3 @@
-#! /usr/bin/perl
-
use strict;
use warnings;
use Test::More 'no_plan';