r55566 - in /trunk/libtest-www-mechanize-perl: Changes META.yml Makefile.PL Mechanize.pm debian/changelog debian/control debian/copyright t/content_contains.t t/content_lacks.t t/html/goodlinks.html t/put_ok.t
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Wed Apr 7 02:55:25 UTC 2010
Author: jawnsy-guest
Date: Wed Apr 7 02:55:15 2010
New Revision: 55566
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=55566
Log:
* Downgraded Test::LongString to 0.12 per upstream
* Added myself to Uploaders and Copyright
* Rewrite control description
* Update years of upstream copyright
Modified:
trunk/libtest-www-mechanize-perl/Changes
trunk/libtest-www-mechanize-perl/META.yml
trunk/libtest-www-mechanize-perl/Makefile.PL
trunk/libtest-www-mechanize-perl/Mechanize.pm
trunk/libtest-www-mechanize-perl/debian/changelog
trunk/libtest-www-mechanize-perl/debian/control
trunk/libtest-www-mechanize-perl/debian/copyright
trunk/libtest-www-mechanize-perl/t/content_contains.t
trunk/libtest-www-mechanize-perl/t/content_lacks.t
trunk/libtest-www-mechanize-perl/t/html/goodlinks.html
trunk/libtest-www-mechanize-perl/t/put_ok.t
Modified: trunk/libtest-www-mechanize-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-www-mechanize-perl/Changes?rev=55566&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/Changes (original)
+++ trunk/libtest-www-mechanize-perl/Changes Wed Apr 7 02:55:15 2010
@@ -3,6 +3,25 @@
WWW::Mechanize and Test::WWW::Mechanize do not use rt.cpan.org for
bug tracking. They are now being tracked via Google Code at
http://code.google.com/p/www-mechanize/issues/list
+
+NEXT
+1.26 Mon Apr 5 00:54:46 CDT 2010
+------------------------------------
+[FIXED]
+Description of error in $mech->content_unlike() was wrong.
+
+Now requires Test::LongString 0.12.
+
+t/put_ok.t now passes, but with a handful of warnings. Help in figuring
+out why would be appreciated.
+
+[INTERNALS]
+Hoisted common code out of get_ok, post_ok, etc.
+
+[DOCUMENTATION]
+Updated copyright and licensing information.
+
+
1.24 Sat Jan 17 13:26:47 CST 2009
------------------------------------
@@ -95,7 +114,6 @@
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
Modified: trunk/libtest-www-mechanize-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-www-mechanize-perl/META.yml?rev=55566&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/META.yml (original)
+++ trunk/libtest-www-mechanize-perl/META.yml Wed Apr 7 02:55:15 2010
@@ -1,21 +1,36 @@
--- #YAML:1.0
-name: Test-WWW-Mechanize
-version: 1.24
-abstract: Testing-specific WWW::Mechanize subclass
-license: ~
-author:
+name: Test-WWW-Mechanize
+version: 1.26
+abstract: Testing-specific WWW::Mechanize subclass
+author:
- Andy Lester <andy at petdance.com>
-generated_by: ExtUtils::MakeMaker version 6.44
-distribution_type: module
-requires:
- Carp::Assert::More: 0
- HTTP::Server::Simple: 0.35
- HTTP::Server::Simple::CGI: 0
- Test::Builder::Tester: 1.09
- Test::LongString: 0.07
- Test::More: 0
- URI::file: 0
- WWW::Mechanize: 1.24
+license: perl
+distribution_type: module
+configure_requires:
+ ExtUtils::MakeMaker: 0
+build_requires:
+ ExtUtils::MakeMaker: 0
+requires:
+ Carp::Assert::More: 0
+ HTTP::Server::Simple: 0.35
+ HTTP::Server::Simple::CGI: 0
+ perl: 5.008
+ Test::Builder::Tester: 1.09
+ Test::LongString: 0.12
+ Test::More: 0
+ URI::file: 0
+ WWW::Mechanize: 1.24
+resources:
+ bugtracker: http://code.google.com/p/www-mechanize/issues/list
+ homepage: http://code.google.com/p/www-mechanize/
+ license: http://dev.perl.org/licenses/
+ MailingList: http://groups.google.com/group/www-mechanize-users
+ Repository: http://code.google.com/p/www-mechanize/source
+no_index:
+ directory:
+ - t
+ - inc
+generated_by: ExtUtils::MakeMaker version 6.56
meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.3.html
- version: 1.3
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
Modified: trunk/libtest-www-mechanize-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-www-mechanize-perl/Makefile.PL?rev=55566&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/Makefile.PL (original)
+++ trunk/libtest-www-mechanize-perl/Makefile.PL Wed Apr 7 02:55:15 2010
@@ -13,7 +13,7 @@
'HTTP::Server::Simple' => '0.35',
'HTTP::Server::Simple::CGI' => 0,
'Test::Builder::Tester' => '1.09',
- 'Test::LongString' => '0.07',
+ 'Test::LongString' => '0.12',
'Test::More' => 0,
'URI::file' => 0,
'WWW::Mechanize' => '1.24',
@@ -22,13 +22,21 @@
clean => { FILES => 'Test-WWW-Mechanize-*' },
};
-if ( $ExtUtils::MakeMaker::VERSION eq '6.36' ) {
- $parms->{EXTRA_META} = <<EOF;
-resources:
- homepage: http://code.google.com/p/www-mechanize/
- bugtracker: http://code.google.com/p/www-mechanize/issues/list
-EOF
- }
+if ( $ExtUtils::MakeMaker::VERSION ge '6.45_01' ) {
+ $parms->{META_MERGE} = {
+ resources => {
+ license => 'http://dev.perl.org/licenses/',
+ homepage => 'http://code.google.com/p/www-mechanize/',
+ bugtracker => 'http://code.google.com/p/www-mechanize/issues/list',
+ Repository => 'http://code.google.com/p/www-mechanize/source',
+ MailingList => 'http://groups.google.com/group/www-mechanize-users',
+ }
+ };
+ $parms->{LICENSE} = 'perl';
+}
+if ( $ExtUtils::MakeMaker::VERSION ge '6.47_02' ) {
+ $parms->{MIN_PERL_VERSION} = 5.008;
+}
WriteMakefile( %{$parms} );
Modified: trunk/libtest-www-mechanize-perl/Mechanize.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-www-mechanize-perl/Mechanize.pm?rev=55566&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/Mechanize.pm (original)
+++ trunk/libtest-www-mechanize-perl/Mechanize.pm Wed Apr 7 02:55:15 2010
@@ -9,11 +9,11 @@
=head1 VERSION
-Version 1.24
-
-=cut
-
-our $VERSION = '1.24';
+Version 1.26
+
+=cut
+
+our $VERSION = '1.26';
=head1 SYNOPSIS
@@ -156,37 +156,11 @@
sub get_ok {
my $self = shift;
- my $url = shift;
-
- my $desc;
- my %opts;
-
- if ( @_ ) {
- my $flex = shift; # The flexible argument
-
- if ( !defined( $flex ) ) {
- $desc = shift;
- }
- elsif ( ref $flex eq 'HASH' ) {
- %opts = %{$flex};
- $desc = shift;
- }
- elsif ( ref $flex eq 'ARRAY' ) {
- %opts = @{$flex};
- $desc = shift;
- }
- else {
- $desc = $flex;
- }
- } # parms left
+
+ my ($url,$desc,%opts) = $self->_unpack_args( 'GET', @_ );
$self->get( $url, %opts );
my $ok = $self->success;
-
- if ( not defined $desc ) {
- $url = $url->url if ref($url) eq 'WWW::Mechanize::Link';
- $desc = "GET $url";
- }
$ok = $self->_maybe_lint( $ok, $desc );
@@ -230,37 +204,12 @@
sub head_ok {
my $self = shift;
- my $url = shift;
-
- my $desc;
- my %opts;
-
- if ( @_ ) {
- my $flex = shift; # The flexible argument
-
- if ( !defined( $flex ) ) {
- $desc = shift;
- }
- elsif ( ref $flex eq 'HASH' ) {
- %opts = %{$flex};
- $desc = shift;
- }
- elsif ( ref $flex eq 'ARRAY' ) {
- %opts = @{$flex};
- $desc = shift;
- }
- else {
- $desc = $flex;
- }
- } # parms left
+
+ my ($url,$desc,%opts) = $self->_unpack_args( 'HEAD', @_ );
$self->head( $url, %opts );
my $ok = $self->success;
- if ( not defined $desc ) {
- $url = $url->url if ref($url) eq 'WWW::Mechanize::Link';
- $desc = "HEAD $url";
- }
$Test->ok( $ok, $desc );
if ( !$ok ) {
$Test->diag( $self->status );
@@ -270,6 +219,7 @@
return $ok;
}
+
=head2 $mech->post_ok( $url, [ \%LWP_options ,] $desc )
A wrapper around WWW::Mechanize's post(), with similar options, except
@@ -283,34 +233,9 @@
sub post_ok {
my $self = shift;
- my $url = shift;
-
- my $desc;
- my %opts;
-
- if ( @_ ) {
- my $flex = shift; # The flexible argument
-
- if ( !defined( $flex ) ) {
- $desc = shift;
- }
- elsif ( ref $flex eq 'HASH' ) {
- %opts = %{$flex};
- $desc = shift;
- }
- elsif ( ref $flex eq 'ARRAY' ) {
- %opts = @{$flex};
- $desc = shift;
- }
- else {
- $desc = $flex;
- }
- } # parms left
-
- if ( not defined $desc ) {
- $url = $url->url if ref($url) eq 'WWW::Mechanize::Link';
- $desc = "POST $url";
- }
+
+ my ($url,$desc,%opts) = $self->_unpack_args( 'POST', @_ );
+
$self->post( $url, \%opts );
my $ok = $self->success;
$Test->ok( $ok, $desc );
@@ -335,35 +260,10 @@
sub put_ok {
my $self = shift;
- my $url = shift;
-
- my $desc;
- my %opts;
-
- if ( @_ ) {
- my $flex = shift; # The flexible argument
-
- if ( !defined( $flex ) ) {
- $desc = shift;
- }
- elsif ( ref $flex eq 'HASH' ) {
- %opts = %{$flex};
- $desc = shift;
- }
- elsif ( ref $flex eq 'ARRAY' ) {
- %opts = @{$flex};
- $desc = shift;
- }
- else {
- $desc = $flex;
- }
- } # parms left
-
- if ( not defined $desc ) {
- $url = $url->url if ref($url) eq 'WWW::Mechanize::Link';
- $desc = "PUT $url";
- }
+
+ my ($url,$desc,%opts) = $self->_unpack_args( 'PUT', @_ );
$self->put( $url, \%opts );
+
my $ok = $self->success;
$Test->ok( $ok, $desc );
if ( !$ok ) {
@@ -511,6 +411,44 @@
}
return $Test->ok( 1, $desc );
}
+
+
+sub _unpack_args {
+ my $self = shift;
+ my $method = shift;
+ my $url = shift;
+
+ my $desc;
+ my %opts;
+
+ if ( @_ ) {
+ my $flex = shift; # The flexible argument
+
+ if ( !defined( $flex ) ) {
+ $desc = shift;
+ }
+ elsif ( ref $flex eq 'HASH' ) {
+ %opts = %{$flex};
+ $desc = shift;
+ }
+ elsif ( ref $flex eq 'ARRAY' ) {
+ %opts = @{$flex};
+ $desc = shift;
+ }
+ else {
+ $desc = $flex;
+ }
+ } # parms left
+
+ if ( not defined $desc ) {
+ $url = $url->url if ref($url) eq 'WWW::Mechanize::Link';
+ $desc = "$method $url";
+ }
+
+ return ($url, $desc, %opts);
+}
+
+
=head1 METHODS: CONTENT CHECKING
@@ -766,7 +704,7 @@
my $self = shift;
my $regex = shift;
my $desc = shift;
- $desc = qq{Content is like "$regex"} if !defined($desc);
+ $desc = qq{Content is unlike "$regex"} if !defined($desc);
local $Test::Builder::Level = $Test::Builder::Level + 1;
return unlike_string( $self->content, $regex, $desc );
@@ -1392,10 +1330,20 @@
=head1 COPYRIGHT & LICENSE
-Copyright 2004-2008 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.
+Copyright 2004-2009 Andy Lester.
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of either:
+
+=over 4
+
+=item * the GNU General Public License as published by the Free
+Software Foundation; either version 1, or (at your option) any
+later version, or
+
+=item * the Artistic License version 2.0.
+
+=back
=cut
Modified: trunk/libtest-www-mechanize-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-www-mechanize-perl/debian/changelog?rev=55566&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/debian/changelog (original)
+++ trunk/libtest-www-mechanize-perl/debian/changelog Wed Apr 7 02:55:15 2010
@@ -1,8 +1,12 @@
libtest-www-mechanize-perl (1.26-1) UNRELEASED; urgency=low
* New upstream release
+ * Downgraded Test::LongString to 0.12 per upstream
+ * Added myself to Uploaders and Copyright
+ * Rewrite control description
+ * Update years of upstream copyright
- -- Jonathan Yu <jawnsy at cpan.org> Tue, 06 Apr 2010 17:43:25 -0400
+ -- Jonathan Yu <jawnsy at cpan.org> Tue, 06 Apr 2010 23:29:38 -0400
libtest-www-mechanize-perl (1.24-2) unstable; urgency=low
Modified: trunk/libtest-www-mechanize-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-www-mechanize-perl/debian/control?rev=55566&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/debian/control (original)
+++ trunk/libtest-www-mechanize-perl/debian/control Wed Apr 7 02:55:15 2010
@@ -2,13 +2,13 @@
Section: perl
Priority: optional
Build-Depends: debhelper (>= 7)
-Build-Depends-Indep: perl, libtest-longstring-perl (>= 0.13),
+Build-Depends-Indep: perl, libtest-longstring-perl (>= 0.12),
libhttp-server-simple-perl, libcarp-assert-more-perl, liburi-perl,
libwww-mechanize-perl (>= 1.24), netbase, libtest-pod-perl,
libtest-pod-coverage-perl, libhtml-lint-perl
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
Uploaders: Krzysztof Krzyzaniak (eloy) <eloy at debian.org>,
- gregor herrmann <gregoa at debian.org>,
+ gregor herrmann <gregoa at debian.org>, Jonathan Yu <jawnsy at cpan.org>,
Damyan Ivanov <dmn at debian.org>, Ansgar Burchardt <ansgar at 43-1.org>,
Rene Mayorga <rmayorga at debian.org>
Standards-Version: 3.8.4
@@ -18,9 +18,11 @@
Package: libtest-www-mechanize-perl
Architecture: all
-Depends: ${perl:Depends}, ${misc:Depends}, libtest-longstring-perl (>= 0.13),
+Depends: ${perl:Depends}, ${misc:Depends}, libtest-longstring-perl (>= 0.12),
libhttp-server-simple-perl, libcarp-assert-more-perl, liburi-perl,
libwww-mechanize-perl (>= 1.24)
-Description: WWW::Mechanize subclass for testing web applications
- Test::WWW::Mechanize is a subclass of WWW::Mechanize that incorporates
- features for web application testing.
+Description: module for testing web applications
+ Test::WWW::Mechanize is a Perl module framework for testing web applications.
+ It extends the functionality of WWW::Mechanize (see libwww-mechanize-perl) by
+ subclassing it, providing additional features for testing web applications.
+ In particular, it provides much nicer diagnostics upon failure.
Modified: trunk/libtest-www-mechanize-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-www-mechanize-perl/debian/copyright?rev=55566&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/debian/copyright (original)
+++ trunk/libtest-www-mechanize-perl/debian/copyright Wed Apr 7 02:55:15 2010
@@ -4,17 +4,18 @@
Name: Test-WWW-Mechanize
Files: *
-Copyright: 2004-2008, Andy Lester <andy at petdance.com>
+Copyright: 2004-2009, Andy Lester <andy at petdance.com>
License: Artistic or GPL-1+
Files: debian/*
-Copyright: 2006, 2007, Krzysztof Krzyzaniak (eloy) <eloy at debian.org>
+Copyright: 2010, Jonathan Yu <jawnsy at cpan.org>
2006-2010, gregor herrmann <gregoa at debian.org>
- 2007, Damyan Ivanov <dmn at debian.org>
- 2007, David Paleino <d.paleino at gmail.com>
- 2008, Ansgar Burchardt <ansgar at 43-1.org>
2009, Nathan Handler <nhandler at ubuntu.com>
2009, Rene Mayorga <rmayorga at debian.org>
+ 2008, Ansgar Burchardt <ansgar at 43-1.org>
+ 2007, David Paleino <d.paleino at gmail.com>
+ 2007, Damyan Ivanov <dmn at debian.org>
+ 2006-2007, Krzysztof Krzyzaniak (eloy) <eloy at debian.org>
License: Artistic or GPL-1+
License: Artistic
Modified: trunk/libtest-www-mechanize-perl/t/content_contains.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-www-mechanize-perl/t/content_contains.t?rev=55566&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/t/content_contains.t (original)
+++ trunk/libtest-www-mechanize-perl/t/content_contains.t Wed Apr 7 02:55:15 2010
@@ -32,9 +32,11 @@
test_test( 'Finds the contains - default desc' );
test_out( 'not ok 1 - Where is Mungo?' );
-test_fail(+3);
-test_diag(q( searched: "<html>\x{0a} <head>\x{0a} <title>Test Page</title>\x{0a} </h"...) );
+test_fail(+5);
+test_diag(q( searched: "<html>\x{0a} <head>\x{0a} <title>Test Page</title>"...) );
test_diag(q( can't find: "Mungo") );
+test_diag(q( LCSS: "go"));
+test_diag(q(LCSS context: "dy>\x{0a} <h1>Test Page</h1>\x{0a} <a href="go"));
$mech->content_contains( 'Mungo', 'Where is Mungo?' );
test_test( 'Handles not finding it' );
Modified: trunk/libtest-www-mechanize-perl/t/content_lacks.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-www-mechanize-perl/t/content_lacks.t?rev=55566&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/t/content_lacks.t (original)
+++ trunk/libtest-www-mechanize-perl/t/content_lacks.t Wed Apr 7 02:55:15 2010
@@ -33,9 +33,9 @@
test_out( q{not ok 1 - Shouldn't say it's a test page} );
test_fail(+4);
-test_diag(q( searched: "<html>\x{0a} <head>\x{0a} <title>Test Page</title>\x{0a} </h"...) );
+test_diag(q( searched: "<html>\x{0a} <head>\x{0a} <title>Test Page</title>"...) );
test_diag(q( and found: "Test Page") );
-test_diag(q( at position: 27) );
+test_diag(q( at position: 33) );
$mech->content_lacks( 'Test Page', q{Shouldn't say it's a test page} );
test_test( 'Handles not finding it' );
Modified: trunk/libtest-www-mechanize-perl/t/html/goodlinks.html
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-www-mechanize-perl/t/html/goodlinks.html?rev=55566&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/t/html/goodlinks.html (original)
+++ trunk/libtest-www-mechanize-perl/t/html/goodlinks.html Wed Apr 7 02:55:15 2010
@@ -1,12 +1,12 @@
<html>
- <head>
- <title>Test Page</title>
- </head>
- <body>
- <h1>Test Page</h1>
- <a href='goodlinks.html'>Test 1</a>
- <a href='badlinks.html'>Test 2</a>
- <a href='goodlinks.html'>Test 3</a>
- </body>
+ <head>
+ <title>Test Page</title>
+ </head>
+ <body>
+ <h1>Test Page</h1>
+ <a href="goodlinks.html">Test 1</a>
+ <a href="badlinks.html">Test 2</a>
+ <a href="goodlinks.html">Test 3</a>
+ </body>
</html>
Modified: trunk/libtest-www-mechanize-perl/t/put_ok.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtest-www-mechanize-perl/t/put_ok.t?rev=55566&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/t/put_ok.t (original)
+++ trunk/libtest-www-mechanize-perl/t/put_ok.t Wed Apr 7 02:55:15 2010
@@ -24,13 +24,15 @@
my $pid = $server->background;
my $server_root = $server->root;
+diag( 'Any help in squashing the warnings in this test would be appreciated' );
my $mech = Test::WWW::Mechanize->new( autocheck => 0 );
isa_ok($mech,'Test::WWW::Mechanize');
+my $text = 'This is what we are putting';
GOOD_PUT: {
my $goodlinks = "$server_root/goodlinks.html";
- $mech->put($goodlinks);
+ $mech->put($goodlinks, $text);
ok($mech->success, 'sanity check: we can load goodlinks.html');
test_out('ok 1 - Try to PUT goodlinks.html');
@@ -47,7 +49,7 @@
BAD_PUT: {
my $badurl = 'http://wango.nonexistent.xx-only-testing/';
- $mech->put($badurl);
+ $mech->put($badurl, $text);
ok(!$mech->success, q{sanity check: we can't load NONEXISTENT.html});
test_out( 'not ok 1 - Try to PUT bad URL' );
More information about the Pkg-perl-cvs-commits
mailing list