r22999 - in /branches/upstream/libtest-warn-perl/current: Changes META.yml Makefile.PL Warn.pm
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Thu Jul 10 18:19:34 UTC 2008
Author: gregoa
Date: Thu Jul 10 18:19:33 2008
New Revision: 22999
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=22999
Log:
[svn-upgrade] Integrating new upstream version, libtest-warn-perl (0.11)
Modified:
branches/upstream/libtest-warn-perl/current/Changes
branches/upstream/libtest-warn-perl/current/META.yml
branches/upstream/libtest-warn-perl/current/Makefile.PL
branches/upstream/libtest-warn-perl/current/Warn.pm
Modified: branches/upstream/libtest-warn-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-warn-perl/current/Changes?rev=22999&op=diff
==============================================================================
--- branches/upstream/libtest-warn-perl/current/Changes (original)
+++ branches/upstream/libtest-warn-perl/current/Changes Thu Jul 10 18:19:33 2008
@@ -1,4 +1,11 @@
Revision history for Perl extension Test::Warn.
+
+0.11 Jun 09 2008
+ - better Makefile.PL
+ - mention Test::Trap
+ - uplevel 2 changed to uplevel 1 to work with Sub::Uplevel 0.19_02
+ - small fixes
+
0.10 May 01 2007
- depend on newer version of Sub::Uplevel
- fixed pod error
Modified: branches/upstream/libtest-warn-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-warn-perl/current/META.yml?rev=22999&op=diff
==============================================================================
--- branches/upstream/libtest-warn-perl/current/META.yml (original)
+++ branches/upstream/libtest-warn-perl/current/META.yml Thu Jul 10 18:19:33 2008
@@ -1,9 +1,9 @@
--- #YAML:1.0
name: Test-Warn
-version: 0.10
+version: 0.11
abstract: Perl extension to test methods for warnings
license: perl
-generated_by: ExtUtils::MakeMaker version 6.31
+generated_by: ExtUtils::MakeMaker version 6.32
distribution_type: module
requires:
Array::Compare: 0
Modified: branches/upstream/libtest-warn-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-warn-perl/current/Makefile.PL?rev=22999&op=diff
==============================================================================
--- branches/upstream/libtest-warn-perl/current/Makefile.PL (original)
+++ branches/upstream/libtest-warn-perl/current/Makefile.PL Thu Jul 10 18:19:33 2008
@@ -16,9 +16,8 @@
'File::Spec' => 0,
'Test::More' => 0,
}, # e.g., Module::Name => 1.1
- ($] >= 5.005 ? ## Add these new keywords supported since 5.005
- (ABSTRACT_FROM => 'Warn.pm', # retrieve abstract from module
- AUTHOR => 'Alexandr Ciornii <alexchorny'.'@gmail.com>') : ()),
- ($ExtUtils::MakeMaker::VERSION ge '6.30_00'?
+ ABSTRACT_FROM => 'Warn.pm', # retrieve abstract from module
+ AUTHOR => 'Alexandr Ciornii <alexchorny'.'@gmail.com>',
+ ($ExtUtils::MakeMaker::VERSION ge '6.31'?
('LICENSE' => 'perl', ) : ()),
);
Modified: branches/upstream/libtest-warn-perl/current/Warn.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtest-warn-perl/current/Warn.pm?rev=22999&op=diff
==============================================================================
--- branches/upstream/libtest-warn-perl/current/Warn.pm (original)
+++ branches/upstream/libtest-warn-perl/current/Warn.pm Thu Jul 10 18:19:33 2008
@@ -8,16 +8,16 @@
warning_is {foo(-dri => "/")} "Unknown Parameter 'dri'", "dri != dir gives warning";
warnings_are {bar(1,1)} ["Width very small", "Height very small"];
-
+
warning_is {add(2,2)} undef, "No warning to calc 2+2"; # or
warnings_are {add(2,2)} [], "No warning to calc 2+2"; # what reads better :-)
-
- warning_like {foo(-dri => "/"} qr/unknown param/i, "an unknown parameter test";
+
+ warning_like {foo(-dri => "/")} qr/unknown param/i, "an unknown parameter test";
warnings_like {bar(1,1)} [qr/width.*small/i, qr/height.*small/i];
-
- warning_is {foo()} {carped => 'didn't found the right parameters'};
+
+ warning_is {foo()} {carped => "didn't found the right parameters"};
warnings_like {foo()} [qr/undefined/,qr/undefined/,{carped => qr/no result/i}];
-
+
warning_like {foo(undef)} 'uninitialized';
warning_like {bar(file => '/etc/passwd')} 'io';
@@ -134,7 +134,7 @@
warning_like {eval q/"$x"; $x;/}
[qw/void uninitialized/],
"some warnings at compile time";
-
+
will work,
while it wouldn't work without the eval.
@@ -153,7 +153,7 @@
Similar to C<warnings_are>,
you can test for multiple warnings via C<carp>
and for warning categories, too:
-
+
warnings_like {foo()}
[qr/bar warning/,
qr/bar warning/,
@@ -198,7 +198,7 @@
=head1 SEE ALSO
-Have a look to the similar L<Test::Exception> module.
+Have a look to the similar L<Test::Exception> module. Test::Trap
=head1 THANKS
@@ -226,9 +226,9 @@
use warnings;
use Array::Compare;
-use Sub::Uplevel;
-
-our $VERSION = '0.10';
+use Sub::Uplevel 0.12;
+
+our $VERSION = '0.11';
require Exporter;
@@ -241,8 +241,8 @@
our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
our @EXPORT = qw(
- warning_is warnings_are
- warning_like warnings_like
+ warning_is warnings_are
+ warning_like warnings_like
);
use Test::Builder;
@@ -260,7 +260,7 @@
my ($called_from) = caller(0); # to find out Carping methods
push @got_warning, _canonical_got_warning($called_from, shift());
};
- uplevel 2,$block;
+ uplevel 1,$block;
my $ok = _cmp_is( \@got_warning, \@exp_warning );
$Tester->ok( $ok, $testname );
$ok or _diag_found_warning(@got_warning),
@@ -280,7 +280,7 @@
my ($called_from) = caller(0); # to find out Carping methods
push @got_warning, _canonical_got_warning($called_from, shift());
};
- uplevel 2,$block;
+ uplevel 1,$block;
my $ok = _cmp_like( \@got_warning, \@exp_warning );
$Tester->ok( $ok, $testname );
$ok or _diag_found_warning(@got_warning),
More information about the Pkg-perl-cvs-commits
mailing list