r5411 - in /packages/libtest-www-mechanize-perl/trunk: ./ debian/ t/
eloy at users.alioth.debian.org
eloy at users.alioth.debian.org
Tue May 15 12:52:28 UTC 2007
Author: eloy
Date: Tue May 15 12:52:28 2007
New Revision: 5411
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=5411
Log:
new upstream version
Modified:
packages/libtest-www-mechanize-perl/trunk/Changes
packages/libtest-www-mechanize-perl/trunk/META.yml
packages/libtest-www-mechanize-perl/trunk/Makefile.PL
packages/libtest-www-mechanize-perl/trunk/Mechanize.pm
packages/libtest-www-mechanize-perl/trunk/debian/changelog
packages/libtest-www-mechanize-perl/trunk/t/content_contains.t
packages/libtest-www-mechanize-perl/trunk/t/content_lacks.t
packages/libtest-www-mechanize-perl/trunk/t/follow_link_ok.t
packages/libtest-www-mechanize-perl/trunk/t/followable_links.t
packages/libtest-www-mechanize-perl/trunk/t/get_ok.t
packages/libtest-www-mechanize-perl/trunk/t/has_tag.t
packages/libtest-www-mechanize-perl/trunk/t/link_content.t
packages/libtest-www-mechanize-perl/trunk/t/link_status.t
packages/libtest-www-mechanize-perl/trunk/t/links_ok.t
packages/libtest-www-mechanize-perl/trunk/t/page_links_content.t
packages/libtest-www-mechanize-perl/trunk/t/page_links_ok.t
packages/libtest-www-mechanize-perl/trunk/t/stuff_inputs.t
Modified: packages/libtest-www-mechanize-perl/trunk/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtest-www-mechanize-perl/trunk/Changes?rev=5411&op=diff
==============================================================================
--- packages/libtest-www-mechanize-perl/trunk/Changes (original)
+++ packages/libtest-www-mechanize-perl/trunk/Changes Tue May 15 12:52:28 2007
@@ -1,9 +1,37 @@
Revision history for Test-WWW-Mechanize
+
+1.14 Fri May 11 16:22:02 CDT 2007
+
+ [FIXES]
+ * Fixes test failures. Thanks to Mark Blackman for RT #26602:
+
+ The module tests currently spawn a server (based on
+ HTTP::Server::Simple::CGI) which is killed when a __DIE__
+ signal is received, normally only when the invoking
+ perl dies. However, as perlvar makes clear, the __DIE__
+ signal is received when eval blocks die as well. The
+ new version (1.22) of WWW::Mechanize now calles
+ HTTP::Message::decoded_content which calls Encode.pm
+ which has a eval block that require's Encode::ConfigLocal
+ which is usually not present, so the eval dies and the
+ HTTP server is killed as soon as the $mech object tries
+ to do a 'get'. It's simple to use a system variable,
+ $^S to find out if the __DIE__ signal is being called
+ for an eval so we ignore that case with the patch
+ attached.
+
+ * The stuff_inputs() function now actually works.
+
+ [DOCUMENTATION]
+ * Made the synopsis show that T:W:M doesn't take the tests=>$x
+ like other Test::* modules. It'd be nice if it did, though.
+
1.12 Thu Jul 6 23:47:59 CDT 2006
[ENHANCEMENTS]
* Added followable_links() method to return only those links
that your mech can actually follow.
+
1.10 Sun Jun 18 22:58:41 CDT 2006
[FIXES]
Modified: packages/libtest-www-mechanize-perl/trunk/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtest-www-mechanize-perl/trunk/META.yml?rev=5411&op=diff
==============================================================================
--- packages/libtest-www-mechanize-perl/trunk/META.yml (original)
+++ packages/libtest-www-mechanize-perl/trunk/META.yml Tue May 15 12:52:28 2007
@@ -1,16 +1,19 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
-name: Test-WWW-Mechanize
-version: 1.12
-version_from: Mechanize.pm
-installdirs: site
-requires:
+--- #YAML:1.0
+name: Test-WWW-Mechanize
+version: 1.14
+abstract: Testing-specific WWW::Mechanize subclass
+license: ~
+generated_by: ExtUtils::MakeMaker version 6.32
+distribution_type: module
+requires:
Carp::Assert::More: 0
HTTP::Server::Simple: 0.07
Test::LongString: 0.07
Test::More: 0
URI::file: 0
- WWW::Mechanize: 1.00
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.30
+ WWW::Mechanize: 1.24
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.2.html
+ version: 1.2
+author:
+ - Andy Lester <andy at petdance.com>
Modified: packages/libtest-www-mechanize-perl/trunk/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtest-www-mechanize-perl/trunk/Makefile.PL?rev=5411&op=diff
==============================================================================
--- packages/libtest-www-mechanize-perl/trunk/Makefile.PL (original)
+++ packages/libtest-www-mechanize-perl/trunk/Makefile.PL Tue May 15 12:52:28 2007
@@ -12,10 +12,20 @@
'Test::More' => 0,
'Test::LongString' => '0.07',
'URI::file' => 0,
- 'WWW::Mechanize' => '1.00',
+ 'WWW::Mechanize' => '1.24',
'Carp::Assert::More' => 0,
'HTTP::Server::Simple' => '0.07',
},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => { FILES => 'Test-WWW-Mechanize-*' },
);
+
+sub MY::postamble {
+ return <<'MAKE_FRAG';
+.PHONY: critic
+
+critic:
+ perlcritic -1 -q -profile perlcriticrc bin/ lib/ t/
+
+MAKE_FRAG
+}
Modified: packages/libtest-www-mechanize-perl/trunk/Mechanize.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtest-www-mechanize-perl/trunk/Mechanize.pm?rev=5411&op=diff
==============================================================================
--- packages/libtest-www-mechanize-perl/trunk/Mechanize.pm (original)
+++ packages/libtest-www-mechanize-perl/trunk/Mechanize.pm Tue May 15 12:52:28 2007
@@ -6,17 +6,21 @@
=head1 VERSION
-Version 1.12
-
-=cut
-
-our $VERSION = '1.12';
+Version 1.14
+
+=cut
+
+our $VERSION = '1.14';
=head1 SYNOPSIS
Test::WWW::Mechanize is a subclass of L<WWW::Mechanize> that incorporates
features for web application testing. For example:
+ use Test::More tests => 5;
+ use Test::WWW::Mechanize;
+
+ my $mech = Test::WWW::Mechanize->new;
$mech->get_ok( $page );
$mech->base_is( 'http://petdance.com/', 'Proper <BASE HREF>' );
$mech->title_is( "Invoice Status", "Make sure we're on the invoice page" );
@@ -25,6 +29,10 @@
This is equivalent to:
+ use Test::More tests => 5;
+ use WWW::Mechanize;
+
+ my $mech = WWW::Mechanize->new;
$mech->get( $page );
ok( $mech->success );
is( $mech->base, 'http://petdance.com', 'Proper <BASE HREF>' );
@@ -39,9 +47,9 @@
use warnings;
use strict;
-use WWW::Mechanize;
-use Test::LongString 0.07;
-use Test::Builder;
+use WWW::Mechanize ();
+use Test::LongString;
+use Test::Builder ();
use Carp::Assert::More;
use base 'WWW::Mechanize';
@@ -449,7 +457,7 @@
=head2 $mech->links_ok( $links [, $desc ] )
-Check the current page for specified links and test for HTTP status
+Follow specified links on the current page and test for HTTP status
200. The links may be specified as a reference to an array containing
L<WWW::Mechanize::Link> objects, an array of URLs, or a scalar URL
name.
@@ -481,7 +489,7 @@
=head2 $mech->link_status_is( $links, $status [, $desc ] )
-Check the current page for specified links and test for HTTP status
+Follow specified links on the current page and test for HTTP status
passed. The links may be specified as a reference to an array
containing L<WWW::Mechanize::Link> objects, an array of URLs, or a
scalar URL name.
@@ -510,7 +518,7 @@
=head2 $mech->link_status_isnt( $links, $status [, $desc ] )
-Check the current page for specified links and test for HTTP status
+Follow specified links on the current page and test for HTTP status
passed. The links may be specified as a reference to an array
containing L<WWW::Mechanize::Link> objects, an array of URLs, or a
scalar URL name.
@@ -540,10 +548,10 @@
=head2 $mech->link_content_like( $links, $regex [, $desc ] )
-Check the current page for specified links and test the content of
-each against I<$regex>. The links may be specified as a reference to
-an array containing L<WWW::Mechanize::Link> objects, an array of URLs,
-or a scalar URL name.
+Follow specified links on the current page and test the resulting
+content of each against I<$regex>. The links may be specified as a
+reference to an array containing L<WWW::Mechanize::Link> objects, an
+array of URLs, or a scalar URL name.
my @links = $mech->followable_links();
$mech->link_content_like( \@links, qr/Restricted/,
@@ -576,10 +584,10 @@
=head2 $mech->link_content_unlike( $links, $regex [, $desc ] )
-Check the current page for specified links and test the content of each
-does not match I<$regex>. The links may be specified as a reference to
-an array containing L<WWW::Mechanize::Link> objects, an array of URLs,
-or a scalar URL name.
+Follow specified links on the current page and test that the resulting
+content of each does not match I<$regex>. The links may be specified as a
+reference to an array containing L<WWW::Mechanize::Link> objects, an array
+of URLs, or a scalar URL name.
my @links = $mech->followable_links();
$mech->link_content_unlike( \@links, qr/Restricted/,
@@ -693,7 +701,7 @@
return @urls;
}
-=head2 follow_link_ok( \%parms [, $comment] )
+=head2 $mech->follow_link_ok( \%parms [, $comment] )
Makes a C<follow_link()> call and executes tests on the results.
The link must be found, and then followed successfully. Otherwise,
@@ -703,7 +711,7 @@
Note that the parms to C<follow_link()> are a hash whereas the parms to
this function are a hashref. You have to call this function like:
- $agent->follow_link_ok( {n=>3}, "looking for 3rd link" );
+ $mech->follow_link_ok( {n=>3}, "looking for 3rd link" );
As with other test functions, C<$comment> is optional. If it is supplied
then it will display when running the test harness in verbose mode.
@@ -742,7 +750,7 @@
return $ok;
}
-=head2 $agent->stuff_inputs( [\%options] )
+=head2 $mech->stuff_inputs( [\%options] )
Finds all free-text input fields (text, textarea, and password) in the
current form and fills them to their maximum length in hopes of finding
@@ -827,8 +835,7 @@
}
}
-
- my @inputs = $self->grep_inputs( { type => qr/^(text|textarea|password)$/ } );
+ my @inputs = $self->find_all_inputs( type => qr/^(text|textarea|password)$/ );
foreach my $field ( @inputs ) {
next if $field->readonly();
@@ -927,6 +934,8 @@
=head1 ACKNOWLEDGEMENTS
Thanks to
+Michael Schwern,
+Mark Blackman,
Mike O'Regan,
Shawn Sorichetti,
Chris Dolan,
@@ -936,7 +945,7 @@
=head1 COPYRIGHT & LICENSE
-Copyright 2004-2005 Andy Lester, all rights reserved.
+Copyright 2004-2007 Andy Lester, all rights reserved.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
Modified: packages/libtest-www-mechanize-perl/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtest-www-mechanize-perl/trunk/debian/changelog?rev=5411&op=diff
==============================================================================
--- packages/libtest-www-mechanize-perl/trunk/debian/changelog (original)
+++ packages/libtest-www-mechanize-perl/trunk/debian/changelog Tue May 15 12:52:28 2007
@@ -1,3 +1,9 @@
+libtest-www-mechanize-perl (1.14-1) unstable; urgency=low
+
+ * New upstream release
+
+ -- Krzysztof Krzyzaniak (eloy) <eloy at debian.org> Tue, 15 May 2007 14:49:55 +0200
+
libtest-www-mechanize-perl (1.12-2) unstable; urgency=low
* Add netbase to build dependencies (closes: #392775).
Modified: packages/libtest-www-mechanize-perl/trunk/t/content_contains.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtest-www-mechanize-perl/trunk/t/content_contains.t?rev=5411&op=diff
==============================================================================
--- packages/libtest-www-mechanize-perl/trunk/t/content_contains.t (original)
+++ packages/libtest-www-mechanize-perl/trunk/t/content_contains.t Tue May 15 12:52:28 2007
@@ -17,7 +17,7 @@
my $pid=$server->background;
ok($pid,'HTTP Server started') or die "Can't start the server";
-sub cleanup { kill(9,$pid) };
+sub cleanup { kill(9,$pid) if !$^S };
$SIG{__DIE__}=\&cleanup;
my $mech=Test::WWW::Mechanize->new();
Modified: packages/libtest-www-mechanize-perl/trunk/t/content_lacks.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtest-www-mechanize-perl/trunk/t/content_lacks.t?rev=5411&op=diff
==============================================================================
--- packages/libtest-www-mechanize-perl/trunk/t/content_lacks.t (original)
+++ packages/libtest-www-mechanize-perl/trunk/t/content_lacks.t Tue May 15 12:52:28 2007
@@ -17,7 +17,7 @@
my $pid=$server->background;
ok($pid,'HTTP Server started') or die "Can't start the server";
-sub cleanup { kill(9,$pid) };
+sub cleanup { kill(9,$pid) if !$^S };
$SIG{__DIE__}=\&cleanup;
my $mech=Test::WWW::Mechanize->new();
Modified: packages/libtest-www-mechanize-perl/trunk/t/follow_link_ok.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtest-www-mechanize-perl/trunk/t/follow_link_ok.t?rev=5411&op=diff
==============================================================================
--- packages/libtest-www-mechanize-perl/trunk/t/follow_link_ok.t (original)
+++ packages/libtest-www-mechanize-perl/trunk/t/follow_link_ok.t Tue May 15 12:52:28 2007
@@ -18,7 +18,7 @@
my $pid=$server->background;
ok($pid,'HTTP Server started') or die "Can't start the server";
-sub cleanup { kill(9,$pid) };
+sub cleanup { kill(9,$pid) if !$^S };
$SIG{__DIE__}=\&cleanup;
FOLLOW_GOOD_LINK: {
Modified: packages/libtest-www-mechanize-perl/trunk/t/followable_links.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtest-www-mechanize-perl/trunk/t/followable_links.t?rev=5411&op=diff
==============================================================================
--- packages/libtest-www-mechanize-perl/trunk/t/followable_links.t (original)
+++ packages/libtest-www-mechanize-perl/trunk/t/followable_links.t Tue May 15 12:52:28 2007
@@ -19,7 +19,7 @@
my $pid = $server->background;
ok($pid,'HTTP Server started') or die "Can't start the server";
-sub cleanup { kill(9,$pid) };
+sub cleanup { kill(9,$pid) if !$^S };
$SIG{__DIE__}=\&cleanup;
my $mech = Test::WWW::Mechanize->new();
Modified: packages/libtest-www-mechanize-perl/trunk/t/get_ok.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtest-www-mechanize-perl/trunk/t/get_ok.t?rev=5411&op=diff
==============================================================================
--- packages/libtest-www-mechanize-perl/trunk/t/get_ok.t (original)
+++ packages/libtest-www-mechanize-perl/trunk/t/get_ok.t Tue May 15 12:52:28 2007
@@ -18,7 +18,7 @@
my $pid=$server->background;
ok($pid,'HTTP Server started') or die "Can't start the server";
-sub cleanup { kill(9,$pid) };
+sub cleanup { kill(9,$pid) if !$^S };
$SIG{__DIE__}=\&cleanup;
my $mech=Test::WWW::Mechanize->new();
Modified: packages/libtest-www-mechanize-perl/trunk/t/has_tag.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtest-www-mechanize-perl/trunk/t/has_tag.t?rev=5411&op=diff
==============================================================================
--- packages/libtest-www-mechanize-perl/trunk/t/has_tag.t (original)
+++ packages/libtest-www-mechanize-perl/trunk/t/has_tag.t Tue May 15 12:52:28 2007
@@ -18,7 +18,7 @@
my $pid=$server->background;
ok($pid,'HTTP Server started') or die "Can't start the server";
-sub cleanup { kill(9,$pid) };
+sub cleanup { kill(9,$pid) if !$^S };
$SIG{__DIE__}=\&cleanup;
my $mech=Test::WWW::Mechanize->new();
Modified: packages/libtest-www-mechanize-perl/trunk/t/link_content.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtest-www-mechanize-perl/trunk/t/link_content.t?rev=5411&op=diff
==============================================================================
--- packages/libtest-www-mechanize-perl/trunk/t/link_content.t (original)
+++ packages/libtest-www-mechanize-perl/trunk/t/link_content.t Tue May 15 12:52:28 2007
@@ -18,7 +18,7 @@
my $pid=$server->background;
ok($pid,'HTTP Server started') or die "Can't start the server";
-sub cleanup { kill(9,$pid) };
+sub cleanup { kill(9,$pid) if !$^S };
$SIG{__DIE__}=\&cleanup;
my $mech=Test::WWW::Mechanize->new();
Modified: packages/libtest-www-mechanize-perl/trunk/t/link_status.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtest-www-mechanize-perl/trunk/t/link_status.t?rev=5411&op=diff
==============================================================================
--- packages/libtest-www-mechanize-perl/trunk/t/link_status.t (original)
+++ packages/libtest-www-mechanize-perl/trunk/t/link_status.t Tue May 15 12:52:28 2007
@@ -18,7 +18,7 @@
my $pid=$server->background;
ok($pid,'HTTP Server started') or die "Can't start the server";
-sub cleanup { kill(9,$pid) };
+sub cleanup { kill(9,$pid) if !$^S };
$SIG{__DIE__}=\&cleanup;
my $mech=Test::WWW::Mechanize->new();
Modified: packages/libtest-www-mechanize-perl/trunk/t/links_ok.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtest-www-mechanize-perl/trunk/t/links_ok.t?rev=5411&op=diff
==============================================================================
--- packages/libtest-www-mechanize-perl/trunk/t/links_ok.t (original)
+++ packages/libtest-www-mechanize-perl/trunk/t/links_ok.t Tue May 15 12:52:28 2007
@@ -18,7 +18,7 @@
my $pid=$server->background;
ok($pid,'HTTP Server started') or die "Can't start the server";
-sub cleanup { kill(9,$pid) };
+sub cleanup { kill(9,$pid) if !$^S };
$SIG{__DIE__}=\&cleanup;
my $mech=Test::WWW::Mechanize->new();
Modified: packages/libtest-www-mechanize-perl/trunk/t/page_links_content.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtest-www-mechanize-perl/trunk/t/page_links_content.t?rev=5411&op=diff
==============================================================================
--- packages/libtest-www-mechanize-perl/trunk/t/page_links_content.t (original)
+++ packages/libtest-www-mechanize-perl/trunk/t/page_links_content.t Tue May 15 12:52:28 2007
@@ -18,7 +18,7 @@
my $pid=$server->background;
ok($pid,'HTTP Server started') or die "Can't start the server";
-sub cleanup { kill(9,$pid) };
+sub cleanup { kill(9,$pid) if !$^S };
$SIG{__DIE__}=\&cleanup;
my $mech=Test::WWW::Mechanize->new();
Modified: packages/libtest-www-mechanize-perl/trunk/t/page_links_ok.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtest-www-mechanize-perl/trunk/t/page_links_ok.t?rev=5411&op=diff
==============================================================================
--- packages/libtest-www-mechanize-perl/trunk/t/page_links_ok.t (original)
+++ packages/libtest-www-mechanize-perl/trunk/t/page_links_ok.t Tue May 15 12:52:28 2007
@@ -18,7 +18,7 @@
my $pid=$server->background;
ok($pid,'HTTP Server started') or die "Can't start the server";
-sub cleanup { kill(9,$pid) };
+sub cleanup { kill(9,$pid) if !$^S };
$SIG{__DIE__}=\&cleanup;
my $mech=Test::WWW::Mechanize->new();
Modified: packages/libtest-www-mechanize-perl/trunk/t/stuff_inputs.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtest-www-mechanize-perl/trunk/t/stuff_inputs.t?rev=5411&op=diff
==============================================================================
--- packages/libtest-www-mechanize-perl/trunk/t/stuff_inputs.t (original)
+++ packages/libtest-www-mechanize-perl/trunk/t/stuff_inputs.t Tue May 15 12:52:28 2007
@@ -18,14 +18,14 @@
my $pid=$server->background;
ok($pid,'HTTP Server started') or die "Can't start the server";
-sub cleanup { kill(9,$pid) };
+sub cleanup { kill(9,$pid) if !$^S };
$SIG{__DIE__}=\&cleanup;
my $mech=Test::WWW::Mechanize->new();
isa_ok( $mech, 'Test::WWW::Mechanize' );
$mech->get('http://localhost:'.PORT.'/form.html');
-#$mech->stuff_inputs();
+$mech->stuff_inputs();
cleanup();
More information about the Pkg-perl-cvs-commits
mailing list