r21990 - in /trunk/libtest-warn-perl: Warn.pm debian/changelog debian/control debian/patches/ debian/patches/language.patch debian/patches/series debian/rules t/warning_is.t t/warning_like.t t/warnings_are.t t/warnings_like.t
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Fri Jun 20 18:25:46 UTC 2008
Author: gregoa
Date: Fri Jun 20 18:25:46 2008
New Revision: 21990
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=21990
Log:
* Refresh debian/rules, no functional changes.
* Split out changes against upstream code into a patch; add quilt framework.
Added:
trunk/libtest-warn-perl/debian/patches/
trunk/libtest-warn-perl/debian/patches/language.patch
trunk/libtest-warn-perl/debian/patches/series
Modified:
trunk/libtest-warn-perl/Warn.pm
trunk/libtest-warn-perl/debian/changelog
trunk/libtest-warn-perl/debian/control
trunk/libtest-warn-perl/debian/rules
trunk/libtest-warn-perl/t/warning_is.t
trunk/libtest-warn-perl/t/warning_like.t
trunk/libtest-warn-perl/t/warnings_are.t
trunk/libtest-warn-perl/t/warnings_like.t
Modified: trunk/libtest-warn-perl/Warn.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-warn-perl/Warn.pm?rev=21990&op=diff
==============================================================================
--- trunk/libtest-warn-perl/Warn.pm (original)
+++ trunk/libtest-warn-perl/Warn.pm Fri Jun 20 18:25:46 2008
@@ -9,13 +9,13 @@
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 for calc 2+2"; # or
- warnings_are {add(2,2)} [], "No warning for calc 2+2"; # reads better :-)
+ 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";
warnings_like {bar(1,1)} [qr/width.*small/i, qr/height.*small/i];
- warning_is {foo()} {carped => 'didn't find 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';
@@ -27,9 +27,9 @@
=head1 DESCRIPTION
-This module provides a few convenience methods for testing warning-based code.
-
-If you are not already familiar with the Test::More manpage,
+This module provides a few convenience methods for testing warning based code.
+
+If you are not already familiar with the Test::More manpage
now would be the time to go take a look.
=head2 FUNCTIONS
@@ -38,29 +38,29 @@
=item warning_is BLOCK STRING, TEST_NAME
-Tests that BLOCK give exactly the one specified warning.
-The test fails if the BLOCK warns more then one time or doesn't warn.
+Tests that BLOCK gives exactly the one specificated warning.
+The test fails if the BLOCK warns more then one times or doesn't warn.
If the string is undef,
then the tests succeeds iff the BLOCK doesn't give any warning.
-Another way to say that there aren't any warnings in the block
-is C<warnings_are {foo()} [], "no warnings">.
-
-If you want to test for a warning given by carp
-you have to write something like:
+Another way to say that there aren't ary warnings in the block,
+is C<warnings_are {foo()} [], "no warnings in">.
+
+If you want to test for a warning given by carp,
+You have to write something like:
C<warning_is {carp "msg"} {carped =E<gt> 'msg'}, "Test for a carped warning">.
-The test will fail
+The test will fail,
if a "normal" warning is found instead of a "carped" one.
Note: C<warn "foo"> would print something like C<foo at -e line 1>.
This method ignores everything after the at. That means, to match this warning
you would have to call C<warning_is {warn "foo"} "foo", "Foo succeeded">.
-If you need to test for a warning at an exactly line,
-try something like C<warning_like {warn "foo"} qr/at XYZ.dat line 5/>.
+If you need to test for a warning at an exactly line,
+try better something like C<warning_like {warn "foo"} qr/at XYZ.dat line 5/>.
warning_is and warning_are are only aliases to the same method.
So you also could write
C<warning_is {foo()} [], "no warning"> or something similar.
-I decided to give two methods to have some more readable method names.
+I decided me to give two methods to have some better readable method names.
A true value is returned if the test succeeds, false otherwise.
@@ -70,33 +70,32 @@
=item warnings_are BLOCK ARRAYREF, TEST_NAME
Tests to see that BLOCK gives exactly the specificated warnings.
-The test fails if the warnings from BLOCK are not exactly the ones in ARRAYREF.
+The test fails if the BLOCK warns a different number than the size of the ARRAYREf
+would have expected.
If the ARRAYREF is equal to [],
then the test succeeds iff the BLOCK doesn't give any warning.
Please read also the notes to warning_is as these methods are only aliases.
-If you want more than one test for carped warnings, try this:
+If you want more than one tests for carped warnings look that way:
C<warnings_are {carp "c1"; carp "c2"} {carped => ['c1','c2'];> or
C<warnings_are {foo()} ["Warning 1", {carped => ["Carp 1", "Carp 2"]}, "Warning 2"]>.
-Note that C<{carped => ...}> always has to be a hash ref.
+Note that C<{carped => ...}> has always to be a hash ref.
=item warning_like BLOCK REGEXP, TEST_NAME
-Tests that BLOCK gives exactly one warning and it can be matched by
-the given regexp.
+Tests that BLOCK gives exactly one warning and it can be matched to the given regexp.
If the string is undef,
then the tests succeeds iff the BLOCK doesn't give any warning.
-The REGEXP is matched against the whole warning message,
-which in general has the form "WARNING at __FILE__ line __LINE__".
-So you can check for a warning in the file Foo.pm on line 5 with
+The REGEXP is matched after the whole warn line,
+which consists in general of "WARNING at __FILE__ line __LINE__".
+So you can check for a warning in at File Foo.pm line 5 with
C<warning_like {bar()} qr/at Foo.pm line 5/, "Testname">.
-Perhaps it isn't sensible to perform such a test;
-however, you should be aware that matching on a sweeping regular expression
-such as 'at', 'file', '\d'
+I don't know whether it's sensful to do such a test :-(
+However, you should be prepared as a matching with 'at', 'file', '\d'
or similar will always pass.
-Consider qr/^foo/ if you want to test for warning "foo something" in file foo.pl.
+Think to the qr/^foo/ if you want to test for warning "foo something" in file foo.pl.
You can also write the regexp in a string as "/.../"
instead of using the qr/.../ syntax.
@@ -104,7 +103,7 @@
as strings without slashes are reserved for warning categories
(to match warning categories as can be seen in the perllexwarn man page).
-As with C<warning_is>,
+Similar to C<warning_is>,
you can test for warnings via C<carp> with:
C<warning_like {bar()} {carped => qr/bar called too early/i};>
@@ -120,18 +119,17 @@
Tests whether a BLOCK gives exactly one warning of the passed category.
The categories are grouped in a tree,
like it is expressed in perllexwarn.
-Note that they have the hierarchical structure from perl 5.8.0,
-which is slightly different from how it was organized up through perl 5.6.1.
-(You can access the internal hierarchy with
-C<$Test::Warn::Categorization::tree>,
-although it isn't recommended).
+Note, that they have the hierarchical structure from perl 5.8.0,
+wich has a little bit changed to 5.6.1 or earlier versions
+(You can access the internal used tree with C<$Test::Warn::Categorization::tree>,
+allthough I wouldn't recommend it)
Thanks to the grouping in a tree,
-it's possible to test simply for an 'io' warning,
-instead of testing for a 'closed|exec|layer|newline|pipe|unopened' warning.
-
-Note that compile-time warnings
-can only be caught in an eval block. So
+it's simple possible to test for an 'io' warning,
+instead for testing for a 'closed|exec|layer|newline|pipe|unopened' warning.
+
+Note, that warnings occuring at compile time,
+can only be catched in an eval block. So
warning_like {eval q/"$x"; $x;/}
[qw/void uninitialized/],
@@ -140,8 +138,9 @@
will work,
while it wouldn't work without the eval.
-Note also that it isn't yet possible
-to test for categories you created yourself with C<warnings::register>.
+Note, that it isn't possible yet,
+to test for own categories,
+created with warnings::register.
=item warnings_like BLOCK ARRAYREF, TEST_NAME
@@ -161,7 +160,7 @@
{carped => qr/bar warning/i},
'io'
],
- "I hope you'll never have to write a test for so many warnings :-)";
+ "I hope, you'll never have to write a test for so many warnings :-)";
=back
@@ -175,28 +174,27 @@
=head1 BUGS
Please note that warnings with newlines inside are making a lot of trouble.
-The only sensible way to handle them is to use the C<warning_like> or
-C<warnings_like> methods.
-The background for these problems is that there is no
-really secure way to distinguish between warnings with newlines and a trailing
+The only sensful way to handle them is to use are the C<warning_like> or
+C<warnings_like> methods. Background for these problems is that there is no
+really secure way to distinguish between warnings with newlines and a tracing
stacktrace.
-If a method has its own warn handler,
+If a method has it's own warn handler,
overwriting C<$SIG{__WARN__}>,
my test warning methods won't get these warnings.
-The C<warning_like BLOCK CATEGORY, TEST_NAME> method isn't fully tested.
-Please pay attention if you use this this calling style,
-and report any bugs you find.
+The C<warning_like BLOCK CATEGORY, TEST_NAME> method isn't extremely tested.
+Please use this calling style with higher attention and
+tell me if you find a bug.
=head1 TODO
Improve this documentation.
The code has some parts doubled - especially in the test scripts.
-This is really awkward and must be changed.
-
-Please feel free to suggest improvements.
+This is really awkward and has to be changed.
+
+Please feel free to suggest me any improvements.
=head1 SEE ALSO
@@ -361,7 +359,7 @@
$Tester->diag( "found warning: $_" );
}
}
- $Tester->diag( "didn't find a warning" ) unless @_;
+ $Tester->diag( "didn't found a warning" ) unless @_;
}
sub _diag_exp_warning {
Modified: trunk/libtest-warn-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-warn-perl/debian/changelog?rev=21990&op=diff
==============================================================================
--- trunk/libtest-warn-perl/debian/changelog (original)
+++ trunk/libtest-warn-perl/debian/changelog Fri Jun 20 18:25:46 2008
@@ -5,6 +5,8 @@
* Set Maintainer to Debian Perl Group.
* Use dist-based URL in debian/watch.
* debian/rules: delete /usr/lib/perl5 only if it exists.
+ * Refresh debian/rules, no functional changes.
+ * Split out changes against upstream code into a patch; add quilt framework.
-- gregor herrmann <gregor+debian at comodo.priv.at> Sat, 01 Dec 2007 18:55:22 +0100
Modified: trunk/libtest-warn-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-warn-perl/debian/control?rev=21990&op=diff
==============================================================================
--- trunk/libtest-warn-perl/debian/control (original)
+++ trunk/libtest-warn-perl/debian/control Fri Jun 20 18:25:46 2008
@@ -3,7 +3,9 @@
Priority: optional
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
Uploaders: Jay Bonci <jaybonci at debian.org>
-Build-Depends: debhelper (>= 4.1), perl (>= 5.6.0-16), libsub-uplevel-perl, libtest-exception-perl, libarray-compare-perl, libtest-simple-perl, libtree-dagnode-perl, libtest-pod-perl
+Build-Depends: debhelper (>= 4.1), perl (>= 5.6.0-16), libsub-uplevel-perl,
+ libtest-exception-perl, libarray-compare-perl, libtest-simple-perl,
+ libtree-dagnode-perl, libtest-pod-perl, quilt (>= 0.40)
Standards-Version: 3.7.2.2
Homepage: http://search.cpan.org/dist/Test-Warn/
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libtest-warn-perl/
Added: trunk/libtest-warn-perl/debian/patches/language.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-warn-perl/debian/patches/language.patch?rev=21990&op=file
==============================================================================
--- trunk/libtest-warn-perl/debian/patches/language.patch (added)
+++ trunk/libtest-warn-perl/debian/patches/language.patch Fri Jun 20 18:25:46 2008
@@ -1,0 +1,298 @@
+Author: Jay Bonci <jaybonci at debian.org>
+Description: Patch from Era Eriksson to clean up some manpage language
+Bug: #322351
+
+--- libtest-warn-perl-0.10.orig/Warn.pm
++++ libtest-warn-perl-0.10/Warn.pm
+@@ -9,13 +9,13 @@
+ 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_is {add(2,2)} undef, "No warning for calc 2+2"; # or
++ warnings_are {add(2,2)} [], "No warning for calc 2+2"; # reads better :-)
+
+ 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 find the right parameters'};
+ warnings_like {foo()} [qr/undefined/,qr/undefined/,{carped => qr/no result/i}];
+
+ warning_like {foo(undef)} 'uninitialized';
+@@ -27,9 +27,9 @@
+
+ =head1 DESCRIPTION
+
+-This module provides a few convenience methods for testing warning based code.
++This module provides a few convenience methods for testing warning-based code.
+
+-If you are not already familiar with the Test::More manpage
++If you are not already familiar with the Test::More manpage,
+ now would be the time to go take a look.
+
+ =head2 FUNCTIONS
+@@ -38,29 +38,29 @@
+
+ =item warning_is BLOCK STRING, TEST_NAME
+
+-Tests that BLOCK gives exactly the one specificated warning.
+-The test fails if the BLOCK warns more then one times or doesn't warn.
++Tests that BLOCK give exactly the one specified warning.
++The test fails if the BLOCK warns more then one time or doesn't warn.
+ If the string is undef,
+ then the tests succeeds iff the BLOCK doesn't give any warning.
+-Another way to say that there aren't ary warnings in the block,
+-is C<warnings_are {foo()} [], "no warnings in">.
++Another way to say that there aren't any warnings in the block
++is C<warnings_are {foo()} [], "no warnings">.
+
+-If you want to test for a warning given by carp,
+-You have to write something like:
++If you want to test for a warning given by carp
++you have to write something like:
+ C<warning_is {carp "msg"} {carped =E<gt> 'msg'}, "Test for a carped warning">.
+-The test will fail,
++The test will fail
+ if a "normal" warning is found instead of a "carped" one.
+
+ Note: C<warn "foo"> would print something like C<foo at -e line 1>.
+ This method ignores everything after the at. That means, to match this warning
+ you would have to call C<warning_is {warn "foo"} "foo", "Foo succeeded">.
+-If you need to test for a warning at an exactly line,
+-try better something like C<warning_like {warn "foo"} qr/at XYZ.dat line 5/>.
++If you need to test for a warning at an exactly line,
++try something like C<warning_like {warn "foo"} qr/at XYZ.dat line 5/>.
+
+ warning_is and warning_are are only aliases to the same method.
+ So you also could write
+ C<warning_is {foo()} [], "no warning"> or something similar.
+-I decided me to give two methods to have some better readable method names.
++I decided to give two methods to have some more readable method names.
+
+ A true value is returned if the test succeeds, false otherwise.
+
+@@ -70,32 +70,33 @@
+ =item warnings_are BLOCK ARRAYREF, TEST_NAME
+
+ Tests to see that BLOCK gives exactly the specificated warnings.
+-The test fails if the BLOCK warns a different number than the size of the ARRAYREf
+-would have expected.
++The test fails if the warnings from BLOCK are not exactly the ones in ARRAYREF.
+ If the ARRAYREF is equal to [],
+ then the test succeeds iff the BLOCK doesn't give any warning.
+
+ Please read also the notes to warning_is as these methods are only aliases.
+
+-If you want more than one tests for carped warnings look that way:
++If you want more than one test for carped warnings, try this:
+ C<warnings_are {carp "c1"; carp "c2"} {carped => ['c1','c2'];> or
+ C<warnings_are {foo()} ["Warning 1", {carped => ["Carp 1", "Carp 2"]}, "Warning 2"]>.
+-Note that C<{carped => ...}> has always to be a hash ref.
++Note that C<{carped => ...}> always has to be a hash ref.
+
+ =item warning_like BLOCK REGEXP, TEST_NAME
+
+-Tests that BLOCK gives exactly one warning and it can be matched to the given regexp.
++Tests that BLOCK gives exactly one warning and it can be matched by
++the given regexp.
+ If the string is undef,
+ then the tests succeeds iff the BLOCK doesn't give any warning.
+
+-The REGEXP is matched after the whole warn line,
+-which consists in general of "WARNING at __FILE__ line __LINE__".
+-So you can check for a warning in at File Foo.pm line 5 with
++The REGEXP is matched against the whole warning message,
++which in general has the form "WARNING at __FILE__ line __LINE__".
++So you can check for a warning in the file Foo.pm on line 5 with
+ C<warning_like {bar()} qr/at Foo.pm line 5/, "Testname">.
+-I don't know whether it's sensful to do such a test :-(
+-However, you should be prepared as a matching with 'at', 'file', '\d'
++Perhaps it isn't sensible to perform such a test;
++however, you should be aware that matching on a sweeping regular expression
++such as 'at', 'file', '\d'
+ or similar will always pass.
+-Think to the qr/^foo/ if you want to test for warning "foo something" in file foo.pl.
++Consider qr/^foo/ if you want to test for warning "foo something" in file foo.pl.
+
+ You can also write the regexp in a string as "/.../"
+ instead of using the qr/.../ syntax.
+@@ -103,7 +104,7 @@
+ as strings without slashes are reserved for warning categories
+ (to match warning categories as can be seen in the perllexwarn man page).
+
+-Similar to C<warning_is>,
++As with C<warning_is>,
+ you can test for warnings via C<carp> with:
+ C<warning_like {bar()} {carped => qr/bar called too early/i};>
+
+@@ -119,17 +120,18 @@
+ Tests whether a BLOCK gives exactly one warning of the passed category.
+ The categories are grouped in a tree,
+ like it is expressed in perllexwarn.
+-Note, that they have the hierarchical structure from perl 5.8.0,
+-wich has a little bit changed to 5.6.1 or earlier versions
+-(You can access the internal used tree with C<$Test::Warn::Categorization::tree>,
+-allthough I wouldn't recommend it)
++Note that they have the hierarchical structure from perl 5.8.0,
++which is slightly different from how it was organized up through perl 5.6.1.
++(You can access the internal hierarchy with
++C<$Test::Warn::Categorization::tree>,
++although it isn't recommended).
+
+ Thanks to the grouping in a tree,
+-it's simple possible to test for an 'io' warning,
+-instead for testing for a 'closed|exec|layer|newline|pipe|unopened' warning.
++it's possible to test simply for an 'io' warning,
++instead of testing for a 'closed|exec|layer|newline|pipe|unopened' warning.
+
+-Note, that warnings occuring at compile time,
+-can only be catched in an eval block. So
++Note that compile-time warnings
++can only be caught in an eval block. So
+
+ warning_like {eval q/"$x"; $x;/}
+ [qw/void uninitialized/],
+@@ -138,9 +140,8 @@
+ will work,
+ while it wouldn't work without the eval.
+
+-Note, that it isn't possible yet,
+-to test for own categories,
+-created with warnings::register.
++Note also that it isn't yet possible
++to test for categories you created yourself with C<warnings::register>.
+
+ =item warnings_like BLOCK ARRAYREF, TEST_NAME
+
+@@ -160,7 +161,7 @@
+ {carped => qr/bar warning/i},
+ 'io'
+ ],
+- "I hope, you'll never have to write a test for so many warnings :-)";
++ "I hope you'll never have to write a test for so many warnings :-)";
+
+ =back
+
+@@ -174,27 +175,28 @@
+ =head1 BUGS
+
+ Please note that warnings with newlines inside are making a lot of trouble.
+-The only sensful way to handle them is to use are the C<warning_like> or
+-C<warnings_like> methods. Background for these problems is that there is no
+-really secure way to distinguish between warnings with newlines and a tracing
++The only sensible way to handle them is to use the C<warning_like> or
++C<warnings_like> methods.
++The background for these problems is that there is no
++really secure way to distinguish between warnings with newlines and a trailing
+ stacktrace.
+
+-If a method has it's own warn handler,
++If a method has its own warn handler,
+ overwriting C<$SIG{__WARN__}>,
+ my test warning methods won't get these warnings.
+
+-The C<warning_like BLOCK CATEGORY, TEST_NAME> method isn't extremely tested.
+-Please use this calling style with higher attention and
+-tell me if you find a bug.
++The C<warning_like BLOCK CATEGORY, TEST_NAME> method isn't fully tested.
++Please pay attention if you use this this calling style,
++and report any bugs you find.
+
+ =head1 TODO
+
+ Improve this documentation.
+
+ The code has some parts doubled - especially in the test scripts.
+-This is really awkward and has to be changed.
++This is really awkward and must be changed.
+
+-Please feel free to suggest me any improvements.
++Please feel free to suggest improvements.
+
+ =head1 SEE ALSO
+
+@@ -359,7 +361,7 @@
+ $Tester->diag( "found warning: $_" );
+ }
+ }
+- $Tester->diag( "didn't found a warning" ) unless @_;
++ $Tester->diag( "didn't find a warning" ) unless @_;
+ }
+
+ sub _diag_exp_warning {
+--- libtest-warn-perl-0.10.orig/t/warning_is.t
++++ libtest-warn-perl-0.10/t/warning_is.t
+@@ -77,7 +77,7 @@
+ __FILE__,
+ "line",
+ WARN_LINE . ".") )
+- : "didn't found a warning";
++ : "didn't find a warning";
+ }
+
+ sub _exp_warn_msg {
+@@ -94,7 +94,7 @@
+ __FILE__,
+ "line",
+ CARP_LINE) ) # Note the difference, that carp msg
+- : "didn't found a warning"; # aren't finished by '.'
++ : "didn't find a warning"; # aren't finished by '.'
+ }
+
+ sub _exp_carp_msg {
+--- libtest-warn-perl-0.10.orig/t/warning_like.t
++++ libtest-warn-perl-0.10/t/warning_like.t
+@@ -79,7 +79,7 @@
+ __FILE__,
+ "line",
+ WARN_LINE . ".") )
+- : "didn't found a warning";
++ : "didn't find a warning";
+ }
+
+ sub _exp_warn_msg {
+@@ -96,7 +96,7 @@
+ __FILE__,
+ "line",
+ CARP_LINE) ) # Note the difference, that carp msg
+- : "didn't found a warning"; # aren't finished by '.'
++ : "didn't find a warning"; # aren't finished by '.'
+ }
+
+ sub _exp_carp_msg {
+--- libtest-warn-perl-0.10.orig/t/warnings_are.t
++++ libtest-warn-perl-0.10/t/warnings_are.t
+@@ -81,12 +81,12 @@
+
+ sub _found_warn_msg {
+ @_ ? map({"found warning: $_ at ". __FILE__ . " line " . WARN_LINE . "." } @_)
+- : "didn't found a warning";
++ : "didn't find a warning";
+ }
+
+ sub _found_carp_msg {
+ @_ ? map({"found carped warning: $_ at ". __FILE__ . " line " . CARP_LINE} @_)
+- : "didn't found a warning";
++ : "didn't find a warning";
+ }
+
+
+--- libtest-warn-perl-0.10.orig/t/warnings_like.t
++++ libtest-warn-perl-0.10/t/warnings_like.t
+@@ -83,12 +83,12 @@
+
+ sub _found_warn_msg {
+ @_ ? map({"found warning: $_ at ". __FILE__ . " line " . WARN_LINE . "." } @_)
+- : "didn't found a warning";
++ : "didn't find a warning";
+ }
+
+ sub _found_carp_msg {
+ @_ ? map({"found carped warning: $_ at ". __FILE__ . " line " . CARP_LINE} @_)
+- : "didn't found a warning";
++ : "didn't find a warning";
+ }
+
+
Added: trunk/libtest-warn-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-warn-perl/debian/patches/series?rev=21990&op=file
==============================================================================
--- trunk/libtest-warn-perl/debian/patches/series (added)
+++ trunk/libtest-warn-perl/debian/patches/series Fri Jun 20 18:25:46 2008
@@ -1,0 +1,1 @@
+language.patch
Modified: trunk/libtest-warn-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-warn-perl/debian/rules?rev=21990&op=diff
==============================================================================
--- trunk/libtest-warn-perl/debian/rules (original)
+++ trunk/libtest-warn-perl/debian/rules Fri Jun 20 18:25:46 2008
@@ -1,53 +1,62 @@
#!/usr/bin/make -f
-# Sample debian/rules that uses debhelper.
-# GNU copyright 1997 to 1999 by Joey Hess.
+# This debian/rules file is provided as a template for normal perl
+# packages. It was created by Marc Brockschmidt <marc at dch-faq.de> for
+# the Debian Perl Group (http://pkg-perl.alioth.debian.org/) but may
+# be used freely wherever it is useful.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-# This is the debhelper compatibility version to use.
-# export DH_COMPAT=4
+# If set to a true value then MakeMaker's prompt function will
+# always return the default without waiting for user input.
+export PERL_MM_USE_DEFAULT=1
-PACKAGE=`pwd | sed -e "s/.*\/\\(.*\\)-.*/\\1/"`
+include /usr/share/quilt/quilt.make
+PERL ?= /usr/bin/perl
+PACKAGE = $(shell dh_listpackages)
+TMP = $(CURDIR)/debian/$(PACKAGE)
-build:
+build: build-stamp
+build-stamp: $(QUILT_STAMPFN)
dh_testdir
- # Add here commands to compile the package.
- perl Makefile.PL verbose INSTALLDIRS=vendor
-clean:
+ $(PERL) Makefile.PL INSTALLDIRS=vendor
+ $(MAKE)
+ $(MAKE) test
+ touch $@
+
+clean: unpatch
dh_testdir
dh_testroot
+ dh_clean build-stamp install-stamp
+ [ ! -f Makefile ] || $(MAKE) realclean
- [ ! -f Makefile ] || $(MAKE) clean
- rm -f Makefile.old
- dh_clean
-
-install:
+install: install-stamp
+install-stamp: build-stamp
dh_testdir
dh_testroot
dh_clean -k
- dh_installdirs
+ $(MAKE) install DESTDIR=$(TMP) PREFIX=/usr
+ [ ! -d $(TMP)/usr/lib/perl5 ] || \
+ rmdir --ignore-fail-on-non-empty --parents --verbose \
+ $(TMP)/usr/lib/perl5
+ touch $@
- $(MAKE) PREFIX=$(CURDIR)/debian/$(PACKAGE)/usr OPTIMIZE="-O2 -g -Wall" test install
- [ ! -d $(CURDIR)/debian/$(shell dh_listpackages)/usr/lib/perl5 ] || rmdir --ignore-fail-on-non-empty --parents --verbose $(CURDIR)/debian/$(shell dh_listpackages)/usr/lib/perl5
+binary-arch:
+# We have nothing to do here for an architecture-independent package
-binary-arch:;
binary-indep: build install
dh_testdir
dh_testroot
dh_installdocs
- dh_installman
dh_installchangelogs Changes
- dh_link
- dh_strip
+ dh_perl
dh_compress
dh_fixperms
dh_installdeb
- dh_perl
dh_gencontrol
dh_md5sums
dh_builddeb
binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+.PHONY: build clean binary-indep binary-arch binary install
Modified: trunk/libtest-warn-perl/t/warning_is.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-warn-perl/t/warning_is.t?rev=21990&op=diff
==============================================================================
--- trunk/libtest-warn-perl/t/warning_is.t (original)
+++ trunk/libtest-warn-perl/t/warning_is.t Fri Jun 20 18:25:46 2008
@@ -77,7 +77,7 @@
__FILE__,
"line",
WARN_LINE . ".") )
- : "didn't find a warning";
+ : "didn't found a warning";
}
sub _exp_warn_msg {
@@ -94,7 +94,7 @@
__FILE__,
"line",
CARP_LINE) ) # Note the difference, that carp msg
- : "didn't find a warning"; # aren't finished by '.'
+ : "didn't found a warning"; # aren't finished by '.'
}
sub _exp_carp_msg {
Modified: trunk/libtest-warn-perl/t/warning_like.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-warn-perl/t/warning_like.t?rev=21990&op=diff
==============================================================================
--- trunk/libtest-warn-perl/t/warning_like.t (original)
+++ trunk/libtest-warn-perl/t/warning_like.t Fri Jun 20 18:25:46 2008
@@ -79,7 +79,7 @@
__FILE__,
"line",
WARN_LINE . ".") )
- : "didn't find a warning";
+ : "didn't found a warning";
}
sub _exp_warn_msg {
@@ -96,7 +96,7 @@
__FILE__,
"line",
CARP_LINE) ) # Note the difference, that carp msg
- : "didn't find a warning"; # aren't finished by '.'
+ : "didn't found a warning"; # aren't finished by '.'
}
sub _exp_carp_msg {
Modified: trunk/libtest-warn-perl/t/warnings_are.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-warn-perl/t/warnings_are.t?rev=21990&op=diff
==============================================================================
--- trunk/libtest-warn-perl/t/warnings_are.t (original)
+++ trunk/libtest-warn-perl/t/warnings_are.t Fri Jun 20 18:25:46 2008
@@ -81,12 +81,12 @@
sub _found_warn_msg {
@_ ? map({"found warning: $_ at ". __FILE__ . " line " . WARN_LINE . "." } @_)
- : "didn't find a warning";
+ : "didn't found a warning";
}
sub _found_carp_msg {
@_ ? map({"found carped warning: $_ at ". __FILE__ . " line " . CARP_LINE} @_)
- : "didn't find a warning";
+ : "didn't found a warning";
}
Modified: trunk/libtest-warn-perl/t/warnings_like.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-warn-perl/t/warnings_like.t?rev=21990&op=diff
==============================================================================
--- trunk/libtest-warn-perl/t/warnings_like.t (original)
+++ trunk/libtest-warn-perl/t/warnings_like.t Fri Jun 20 18:25:46 2008
@@ -83,12 +83,12 @@
sub _found_warn_msg {
@_ ? map({"found warning: $_ at ". __FILE__ . " line " . WARN_LINE . "." } @_)
- : "didn't find a warning";
+ : "didn't found a warning";
}
sub _found_carp_msg {
@_ ? map({"found carped warning: $_ at ". __FILE__ . " line " . CARP_LINE} @_)
- : "didn't find a warning";
+ : "didn't found a warning";
}
More information about the Pkg-perl-cvs-commits
mailing list