r9031 - in /trunk/libtest-www-mechanize-perl: ./ debian/ t/ t/html/

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Thu Nov 8 13:02:57 UTC 2007


Author: dmn
Date: Thu Nov  8 13:02:57 2007
New Revision: 9031

URL: http://svn.debian.org/wsvn/?sc=1&rev=9031
Log:
* New upstream release

Added:
    trunk/libtest-www-mechanize-perl/t/html/bad.html
      - copied unchanged from r9030, branches/upstream/libtest-www-mechanize-perl/current/t/html/bad.html
    trunk/libtest-www-mechanize-perl/t/html_lint_ok.t
      - copied unchanged from r9030, branches/upstream/libtest-www-mechanize-perl/current/t/html_lint_ok.t
    trunk/libtest-www-mechanize-perl/t/submit_form_ok.t
      - copied unchanged from r9030, branches/upstream/libtest-www-mechanize-perl/current/t/submit_form_ok.t
Modified:
    trunk/libtest-www-mechanize-perl/Changes
    trunk/libtest-www-mechanize-perl/MANIFEST
    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/t/00load.t
    trunk/libtest-www-mechanize-perl/t/content_contains.t
    trunk/libtest-www-mechanize-perl/t/content_lacks.t
    trunk/libtest-www-mechanize-perl/t/follow_link_ok.t
    trunk/libtest-www-mechanize-perl/t/followable_links.t
    trunk/libtest-www-mechanize-perl/t/get_ok-parms.t
    trunk/libtest-www-mechanize-perl/t/get_ok.t
    trunk/libtest-www-mechanize-perl/t/has_tag.t
    trunk/libtest-www-mechanize-perl/t/link_content.t
    trunk/libtest-www-mechanize-perl/t/link_status.t
    trunk/libtest-www-mechanize-perl/t/links_ok.t
    trunk/libtest-www-mechanize-perl/t/new.t
    trunk/libtest-www-mechanize-perl/t/page_links_content.t
    trunk/libtest-www-mechanize-perl/t/page_links_ok.t
    trunk/libtest-www-mechanize-perl/t/pod-coverage.t
    trunk/libtest-www-mechanize-perl/t/pod.t
    trunk/libtest-www-mechanize-perl/t/stuff_inputs.t

Modified: trunk/libtest-www-mechanize-perl/Changes
URL: http://svn.debian.org/wsvn/trunk/libtest-www-mechanize-perl/Changes?rev=9031&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/Changes (original)
+++ trunk/libtest-www-mechanize-perl/Changes Thu Nov  8 13:02:57 2007
@@ -1,120 +1,165 @@
 Revision history for Test-WWW-Mechanize
 
+1.16    Mon Oct 29 15:34:21 CDT 2007
+------------------------------------
+Please note that WWW::Mechanize and Test::WWW::Mechanize are no
+longer using rt.cpan.org for bug tracking.  They are now being
+tracked via Google Code at
+http://code.google.com/p/www-mechanize/issues/list
+
+[ENHANCEMENTS]
+Added $mech->post_ok().  Thanks, Greg Sheard.
+
+Added $mech->submit_form_ok().  Thanks, Mark Stosberg.
+
+Added $mech->html_lint_ok()
+
+[FIXES]
+Fixed some bugs that were causing test failures.
+
+
 1.14    Fri May 11 16:22:02 CDT 2007
+------------------------------------
+[FIXES]
+Fixes test failures.  Thanks to Mark Blackman for RT #26602:
 
-        [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 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.
 
-        * 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.
+[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.
+------------------------------------
+[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]
-        * RT #19147: Tests turn off the http_proxy environment variable
-          before starting.  Thanks to Matt Trout.
-        * RT #18779: makes stuff_inputs() conform to the documentation,
-          changing the implementation to expect an arrayref for
-          $options->{ ignore }, as opposed to a hashref.  Thanks to
-          Mike O'Regan.
+------------------------------------
+[FIXES]
+RT #19147: Tests turn off the http_proxy environment variable before
+starting.  Thanks to Matt Trout.
 
-        [ENHANCEMENTS]
-        * Added base_is, base_like and base_unlike.  Thanks to MATSUNO
-          Tokuhiro.
+RT #18779: makes stuff_inputs() conform to the documentation,
+changing the implementation to expect an arrayref for $options->{ignore},
+as opposed to a hashref.  Thanks to Mike O'Regan.
+
+[ENHANCEMENTS]
+Added base_is, base_like and base_unlike.  Thanks to MATSUNO Tokuhiro.
 
 
 1.08    Mon Nov 21 10:35:23 CST 2005
-        [FIXES]
-        * has_tag_like()'s regex was reversed, so would match when
-          it shouldn't.  Thanks to Chris Dolan.
+------------------------------------
+[FIXES]
+has_tag_like()'s regex was reversed, so would match when it shouldn't.
+Thanks to Chris Dolan.
 
-        [DOCUMENTATION]
-        * Added links to support sites.
+[DOCUMENTATION]
+Added links to support sites.
+
 
 1.06    Jun 29 2005
-        [INTERNALS]
-        * Updated test suite to use HTTP::Server::Simple.
-          Thanks to Shawn Sorichetti for it.
+------------------------------------
+[INTERNALS]
+Updated test suite to use HTTP::Server::Simple.  Thanks to Shawn
+Sorichetti for it.
+
 
 1.05_02 Sun Apr  3 12:19:05 CDT 2005
-        [ENHANCEMENTS]
-        * Added has_tag() and has_tag_like().  Thanks RJBS.
+------------------------------------
+[ENHANCEMENTS]
+Added has_tag() and has_tag_like().  Thanks RJBS.
+
 
 1.05_01 Tue Mar  8 16:24:36 CST 2005
-        [ENHANCEMENTS]
-        * get_ok() now shows the status line for the mech if the test
-          fails.
-        * get_ok() now returns true/false, not an HTTP::Response.
+------------------------------------
+[ENHANCEMENTS]
+get_ok() now shows the status line for the mech if the test fails.
+
+get_ok() now returns true/false, not an HTTP::Response.
+
 
 1.04    Fri Mar  4 00:08:42 CST 2005
-        [ENHANCEMENTS]
-        * Added follow_link_ok().  Thanks to Mike O'Regan.
-        * Added get_ok().  Thanks to Dan Friedman.
+------------------------------------
+[ENHANCEMENTS]
+Added follow_link_ok().  Thanks to Mike O'Regan.
+
+Added get_ok().  Thanks to Dan Friedman.
+
 
 1.02    Wed Dec 15 17:35:23 CST 2004
-        [ENHANCEMENTS]
-        * Added content_lacks()
+------------------------------------
+[ENHANCEMENTS]
+Added content_lacks()
 
-        [DOCUMENTATION]
-        * Fixed some documentation bugs.  Thanks to Drew Taylor.
+[DOCUMENTATION]
+Fixed some documentation bugs.  Thanks to Drew Taylor.
+
 
 1.00    Thu Dec  9 11:41:50 CST 2004
-        [ENHANCEMENTS]
-        * Added content_contains()
-        * Fixed diagnostic errors to work the same way regardless of
-          which version of Test::Builder you have.
+------------------------------------
+[ENHANCEMENTS]
+Added content_contains()
+
+Fixed diagnostic errors to work the same way regardless of which
+version of Test::Builder you have.
+
 
 0.99    Sun Oct 24 11:17:59 CDT 2004
-        [ENHANCEMENTS]
-        * Added $mech->content_unlike and $mech->title_unlike
-        * Made the reporting of where the error happened reflect the
-          caller's code.
+------------------------------------
+[ENHANCEMENTS]
+Added $mech->content_unlike and $mech->title_unlike
+
+Made the reporting of where the error happened reflect the caller's
+code.
+
 
 0.06    Thu Sep 30 21:49:08 CDT 2004
-        [ENHANCEMENTS]
-        * New funcs
-             - page_links_content_like()
-             - page_links_content_unlike()
-             - link_content_like()
-             - link_content_unlike()
-             - link_status_isnt()
+------------------------------------
+[ENHANCEMENTS]
+New funcs
+    - page_links_content_like()
+    - page_links_content_unlike()
+    - link_content_like()
+    - link_content_unlike()
+    - link_status_isnt()
+
 
 0.04    Mon Jul 12 22:16:10 CDT 2004
-        [THINGS THAT MAY BREAK YOUR CODE]
-        * Renamed link_status() to link_status_is().
+------------------------------------
+[THINGS THAT MAY BREAK YOUR CODE]
+Renamed link_status() to link_status_is().
 
-        [FIXES]
-        * Fixed a bug in link_status_is().
+[FIXES]
+Fixed a bug in link_status_is().
+
 
 0.02    July 4 2004
-        [ENHANCEMENTS]
-        * Added links_ok() and page_links_ok() methods.  Thanks to
-          Shawn Sorichetti.
+------------------------------------
+[ENHANCEMENTS]
+Added links_ok() and page_links_ok() methods.  Thanks to Shawn
+Sorichetti.
+
 
 0.01    Mon Jun 28 16:38:45 CDT 2004
-        First version, released on an unsuspecting world.
+------------------------------------
+First version, released on an unsuspecting world.
 

Modified: trunk/libtest-www-mechanize-perl/MANIFEST
URL: http://svn.debian.org/wsvn/trunk/libtest-www-mechanize-perl/MANIFEST?rev=9031&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/MANIFEST (original)
+++ trunk/libtest-www-mechanize-perl/MANIFEST Thu Nov  8 13:02:57 2007
@@ -13,6 +13,7 @@
 t/get_ok.t
 t/get_ok-parms.t
 t/has_tag.t
+t/html_lint_ok.t
 t/link_content.t
 t/links_ok.t
 t/link_status.t
@@ -22,7 +23,9 @@
 t/pod-coverage.t
 t/pod.t
 t/stuff_inputs.t
+t/submit_form_ok.t
 
+t/html/bad.html
 t/html/badlinks.html
 t/html/form.html
 t/html/goodlinks.html

Modified: trunk/libtest-www-mechanize-perl/META.yml
URL: http://svn.debian.org/wsvn/trunk/libtest-www-mechanize-perl/META.yml?rev=9031&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/META.yml (original)
+++ trunk/libtest-www-mechanize-perl/META.yml Thu Nov  8 13:02:57 2007
@@ -1,19 +1,17 @@
---- #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:     
+# 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.16
+version_from: Mechanize.pm
+installdirs:  site
+requires:
     Carp::Assert::More:            0
     HTTP::Server::Simple:          0.07
+    Test::Builder::Tester:         1.09
     Test::LongString:              0.07
     Test::More:                    0
     URI::file:                     0
     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>
+
+distribution_type: module
+generated_by: ExtUtils::MakeMaker version 6.30

Modified: trunk/libtest-www-mechanize-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/trunk/libtest-www-mechanize-perl/Makefile.PL?rev=9031&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/Makefile.PL (original)
+++ trunk/libtest-www-mechanize-perl/Makefile.PL Thu Nov  8 13:02:57 2007
@@ -9,12 +9,13 @@
     ABSTRACT_FROM       => 'Mechanize.pm',
     PL_FILES            => {},
     PREREQ_PM => {
-        'Test::More'        => 0,
-        'Test::LongString'  => '0.07',
-        'URI::file'         => 0,
-        'WWW::Mechanize'    => '1.24',
-        'Carp::Assert::More' => 0,
-        'HTTP::Server::Simple' => '0.07',
+        'Carp::Assert::More'    => 0,
+        'HTTP::Server::Simple'  => '0.07',
+        'Test::Builder::Tester' => '1.09',
+        'Test::LongString'      => '0.07',
+        'Test::More'            => 0,
+        'URI::file'             => 0,
+        'WWW::Mechanize'        => '1.24',
     },
     dist                => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
     clean               => { FILES => 'Test-WWW-Mechanize-*' },
@@ -22,10 +23,17 @@
 
 sub MY::postamble {
     return <<'MAKE_FRAG';
-.PHONY: critic
+.PHONY: critic tags
 
 critic:
 	perlcritic -1 -q -profile perlcriticrc bin/ lib/ t/
 
+tags:
+	ctags -f tags --recurse --totals \
+		--exclude=blib \
+		--exclude=.svn \
+		--exclude='*~' \
+		--languages=Perl --langmap=Perl:+.t \
+
 MAKE_FRAG
 }

Modified: trunk/libtest-www-mechanize-perl/Mechanize.pm
URL: http://svn.debian.org/wsvn/trunk/libtest-www-mechanize-perl/Mechanize.pm?rev=9031&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/Mechanize.pm (original)
+++ trunk/libtest-www-mechanize-perl/Mechanize.pm Thu Nov  8 13:02:57 2007
@@ -6,11 +6,11 @@
 
 =head1 VERSION
 
-Version 1.14
-
-=cut
-
-our $VERSION = '1.14';
+Version 1.16
+
+=cut
+
+our $VERSION = '1.16';
 
 =head1 SYNOPSIS
 
@@ -50,6 +50,7 @@
 use WWW::Mechanize ();
 use Test::LongString;
 use Test::Builder ();
+use Carp ();
 use Carp::Assert::More;
 
 use base 'WWW::Mechanize';
@@ -75,7 +76,7 @@
     return $self;
 }
 
-=head1 METHODS
+=head1 METHODS: GETTING & POSTING
 
 =head2 $mech->get_ok($url, [ \%LWP_options ,] $desc)
 
@@ -84,6 +85,8 @@
 well-behaved C<*_ok()> functions, it returns true if the test passed,
 or false if not.
 
+A default description of "GET $url" is used if none if provided.
+
 =cut
 
 sub get_ok {
@@ -115,6 +118,7 @@
     $self->get( $url, %opts );
     my $ok = $self->success;
 
+    $desc = "GET $url" unless defined $desc;
     $Test->ok( $ok, $desc );
     if ( !$ok ) {
         $Test->diag( $self->status );
@@ -124,6 +128,208 @@
     return $ok;
 }
 
+=head2 $mech->post_ok( $url, [ \%LWP_options ,] $desc )
+
+A wrapper around WWW::Mechanize's post(), with similar options, except
+the second argument needs to be a hash reference, not a hash. Like
+well-behaved C<*_ok()> functions, it returns true if the test passed,
+or false if not.
+
+A default description of "POST to $url" is used if none if provided.
+
+=cut
+
+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
+
+    $desc = "POST to $url" unless defined $desc;
+    $self->post( $url, \%opts );
+    my $ok = $self->success;
+    $Test->ok( $ok, $desc );
+    if ( !$ok ) {
+        $Test->diag( $self->status );
+        $Test->diag( $self->response->message ) if $self->response;
+    }
+
+    return $ok;
+}
+
+
+=head2 submit_form_ok( \%parms [, $comment] )
+
+Makes a C<submit_form()> call and executes tests on the results.
+The form must be found, and then submitted successfully.  Otherwise,
+this test fails.
+
+I<%parms> is a hashref containing the parms to pass to C<submit_form()>.
+Note that the parms to C<submit_form()> are a hash whereas the parms to
+this function are a hashref.  You have to call this function like:
+
+    $agent->submit_form_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.
+
+Returns true value if the specified link was found and followed
+successfully.  The L<HTTP::Response> object returned by submit_form()
+is not available.
+
+=cut
+
+sub submit_form_ok {
+    my $self = shift;
+    my $parms = shift || {};
+    my $comment = shift;
+
+    if ( ref $parms ne 'HASH' ) {
+       Carp::croak "FATAL: parameters must be given as a hashref";
+    }
+
+    # return from submit_form() is an HTTP::Response or undef
+    my $response = $self->submit_form( %$parms );
+
+    my $ok;
+    my $error;
+    if ( !$response ) {
+        $error = "No matching form found";
+    }
+    else {
+        if ( $response->is_success ) {
+            $ok = 1;
+        }
+        else {
+            $error = $response->as_string;
+        }
+    }
+
+    $Test->ok( $ok, $comment );
+    $Test->diag( $error ) if $error;
+
+    return $ok;
+}
+
+
+=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,
+this test fails.
+
+I<%parms> is a hashref containing the parms to pass to C<follow_link()>.
+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:
+
+    $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.
+
+Returns a true value if the specified link was found and followed
+successfully.  The L<HTTP::Response> object returned by follow_link()
+is not available.
+
+=cut
+
+sub follow_link_ok {
+    my $self = shift;
+    my $parms = shift || {};
+    my $comment = shift;
+
+    if ( ref $parms ne 'HASH' ) {
+       Carp::croak "FATAL: parameters must be given as a hashref";
+    }
+
+    # return from follow_link() is an HTTP::Response or undef
+    my $response = $self->follow_link( %$parms );
+
+    my $ok;
+    my $error;
+    if ( !$response ) {
+        $error = "No matching link found";
+    }
+    else {
+        if ( $response->is_success ) {
+            $ok = 1;
+        }
+        else {
+            $error = $response->as_string;
+        }
+    }
+
+    $Test->ok( $ok, $comment );
+    $Test->diag( $error ) if $error;
+
+    return $ok;
+}
+
+=head1 METHODS: CONTENT CHECKING
+
+=head2 html_lint_ok( [$msg] )
+
+Checks the validity of the HTML on the current page.  If the page is not
+HTML, then it fails.
+
+The URI is automatically appended to the I<$msg>.
+
+=cut
+
+sub html_lint_ok {
+    my $self = shift;
+    my $msg = shift;
+
+    my $uri = $self->uri;
+    $msg = $msg ? "$msg ($uri)" : $uri;
+
+    my $ok;
+
+    if ( $self->is_html ) {
+        require HTML::Lint;
+
+        my $lint = HTML::Lint->new;
+        $lint->newfile( $uri );
+        $lint->parse( $self->content );
+
+        my @errors = $lint->errors;
+        if ( @errors ) {
+            $ok = $Test->ok( 0, $msg );
+            $Test->diag( $_->as_string ) for @errors;
+        }
+        else {
+            $ok = $Test->ok( 1, $msg );
+        }
+    }
+    else {
+        $ok = $Test->ok( 0, $msg );
+        $Test->diag( q{This page doesn't appear to be HTML, or didn't get the proper text/html content type returned.} );
+    }
+
+    return $ok;
+}
+
+
 =head2 $mech->title_is( $str [, $desc ] )
 
 Tells if the title of the page is the given string.
@@ -388,7 +594,7 @@
     return $ok;
 }
 
-=head2 $mech->page_links_content_like( $regex,[ $desc ] )
+=head2 $mech->page_links_content_like( $regex [, $desc ] )
 
 Follow all links on the current page and test their contents for I<$regex>.
 
@@ -421,7 +627,7 @@
     return $ok;
 }
 
-=head2 $mech->page_links_content_unlike( $regex,[ $desc ] )
+=head2 $mech->page_links_content_unlike( $regex [, $desc ] )
 
 Follow all links on the current page and test their contents do not
 contain the specified regex.
@@ -701,55 +907,6 @@
     return @urls;
 }
 
-=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,
-this test fails.
-
-I<%parms> is a hashref containing the parms to pass to C<follow_link()>.
-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:
-
-    $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.
-
-Returns true value if the specified link was found and followed
-successfully.  The HTTP::Response object returned by follow_link()
-is not available.
-
-=cut
-
-sub follow_link_ok {
-    my $self = shift;
-    my $parms = shift || {};
-    my $comment = shift;
-
-    # return from follow_link() is an HTTP::Response or undef
-    my $response = $self->follow_link( %$parms );
-
-    my $ok;
-    my $error;
-    if ( !$response ) {
-        $error = "No matching link found";
-    }
-    else {
-        if ( !$response->is_success ) {
-            $error = $response->as_string;
-        }
-        else {
-            $ok = 1;
-        }
-    }
-
-    $Test->ok( $ok, $comment );
-    $Test->diag( $error ) if $error;
-
-    return $ok;
-}
-
 =head2 $mech->stuff_inputs( [\%options] )
 
 Finds all free-text input fields (text, textarea, and password) in the
@@ -889,7 +1046,9 @@
 
 =head1 TODO
 
-Add HTML::Lint and HTML::Tidy capabilities.
+Add HTML::Tidy capabilities.
+
+Add a broken image check.
 
 =head1 AUTHOR
 
@@ -898,9 +1057,8 @@
 =head1 BUGS
 
 Please report any bugs or feature requests to
-C<bug-test-www-mechanize at rt.cpan.org>, or through the web interface at
-L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Test-WWW-Mechanize>.
-I will be notified, and then you'll automatically be notified of progress on
+<http://code.google.com/p/www-mechanize/issues/list>.  I will be
+notified, and then you'll automatically be notified of progress on
 your bug as I make changes.
 
 =head1 SUPPORT
@@ -913,6 +1071,14 @@
 
 =over 4
 
+=item * Google Code bug tracker
+
+L<http://code.google.com/p/www-mechanize/issues/list>
+
+Please note that WWW::Mechanize and Test::WWW::Mechanize do NOT use
+rt.cpan.org at
+L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-WWW-Mechanize>
+
 =item * AnnoCPAN: Annotated CPAN documentation
 
 L<http://annocpan.org/dist/Test-WWW-Mechanize>
@@ -921,10 +1087,6 @@
 
 L<http://cpanratings.perl.org/d/Test-WWW-Mechanize>
 
-=item * RT: CPAN's request tracker
-
-L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Test-WWW-Mechanize>
-
 =item * Search CPAN
 
 L<http://search.cpan.org/dist/Test-WWW-Mechanize>
@@ -934,6 +1096,7 @@
 =head1 ACKNOWLEDGEMENTS
 
 Thanks to
+Greg Sheard,
 Michael Schwern,
 Mark Blackman,
 Mike O'Regan,

Modified: trunk/libtest-www-mechanize-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libtest-www-mechanize-perl/debian/changelog?rev=9031&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/debian/changelog (original)
+++ trunk/libtest-www-mechanize-perl/debian/changelog Thu Nov  8 13:02:57 2007
@@ -1,3 +1,9 @@
+libtest-www-mechanize-perl (1.16-1) UNRELEASED; urgency=low
+
+  * New upstream release
+
+ -- Damyan Ivanov <dmn at debian.org>  Thu, 08 Nov 2007 15:02:29 +0200
+
 libtest-www-mechanize-perl (1.14-2) UNRELEASED; urgency=low
 
   * debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser

Modified: trunk/libtest-www-mechanize-perl/t/00load.t
URL: http://svn.debian.org/wsvn/trunk/libtest-www-mechanize-perl/t/00load.t?rev=9031&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/t/00load.t (original)
+++ trunk/libtest-www-mechanize-perl/t/00load.t Thu Nov  8 13:02:57 2007
@@ -1,4 +1,4 @@
-#!perl -T
+#!perl
 
 use Test::More tests => 1;
 

Modified: trunk/libtest-www-mechanize-perl/t/content_contains.t
URL: http://svn.debian.org/wsvn/trunk/libtest-www-mechanize-perl/t/content_contains.t?rev=9031&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/t/content_contains.t (original)
+++ trunk/libtest-www-mechanize-perl/t/content_contains.t Thu Nov  8 13:02:57 2007
@@ -1,4 +1,4 @@
-#!perl -Tw
+#!perl -w
 
 use strict;
 use warnings;

Modified: trunk/libtest-www-mechanize-perl/t/content_lacks.t
URL: http://svn.debian.org/wsvn/trunk/libtest-www-mechanize-perl/t/content_lacks.t?rev=9031&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/t/content_lacks.t (original)
+++ trunk/libtest-www-mechanize-perl/t/content_lacks.t Thu Nov  8 13:02:57 2007
@@ -1,4 +1,4 @@
-#!perl -Tw
+#!perl -w
 
 use strict;
 use warnings;

Modified: trunk/libtest-www-mechanize-perl/t/follow_link_ok.t
URL: http://svn.debian.org/wsvn/trunk/libtest-www-mechanize-perl/t/follow_link_ok.t?rev=9031&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/t/follow_link_ok.t (original)
+++ trunk/libtest-www-mechanize-perl/t/follow_link_ok.t Thu Nov  8 13:02:57 2007
@@ -1,4 +1,4 @@
-#!perl -T
+#!perl
 
 use strict;
 use warnings;

Modified: trunk/libtest-www-mechanize-perl/t/followable_links.t
URL: http://svn.debian.org/wsvn/trunk/libtest-www-mechanize-perl/t/followable_links.t?rev=9031&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/t/followable_links.t (original)
+++ trunk/libtest-www-mechanize-perl/t/followable_links.t Thu Nov  8 13:02:57 2007
@@ -1,4 +1,4 @@
-#!perl -T
+#!perl
 
 use strict;
 use warnings;

Modified: trunk/libtest-www-mechanize-perl/t/get_ok-parms.t
URL: http://svn.debian.org/wsvn/trunk/libtest-www-mechanize-perl/t/get_ok-parms.t?rev=9031&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/t/get_ok-parms.t (original)
+++ trunk/libtest-www-mechanize-perl/t/get_ok-parms.t Thu Nov  8 13:02:57 2007
@@ -1,4 +1,4 @@
-#!perl -T
+#!perl
 
 use strict;
 use warnings;

Modified: trunk/libtest-www-mechanize-perl/t/get_ok.t
URL: http://svn.debian.org/wsvn/trunk/libtest-www-mechanize-perl/t/get_ok.t?rev=9031&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/t/get_ok.t (original)
+++ trunk/libtest-www-mechanize-perl/t/get_ok.t Thu Nov  8 13:02:57 2007
@@ -1,22 +1,30 @@
-#!perl -T
+#!perl
 
 use strict;
 use warnings;
-use Test::More tests => 11;
+use Test::More;
 use Test::Builder::Tester;
 use URI::file;
 
 use constant PORT => 13432;
 
-$ENV{http_proxy} = ''; # All our tests are running on localhost
+use constant NONEXISTENT => 'http://blahblablah.xx-nonexistent.';
+BEGIN {
+    if ( gethostbyname( 'blahblahblah.xx-nonexistent.' ) ) {
+        plan skip_all => 'Found an A record for the non-existent domain';
+    }
+}
 
 BEGIN {
+    $ENV{http_proxy} = ''; # All our tests are running on localhost
+    plan tests => 11;
     use_ok( 'Test::WWW::Mechanize' );
 }
 
+
 my $server=TWMServer->new(PORT);
 my $pid=$server->background;
-ok($pid,'HTTP Server started') or die "Can't start the server";
+ok( $pid,'HTTP Server started' ) or die "Can't start the server";
 
 sub cleanup { kill(9,$pid) if !$^S };
 $SIG{__DIE__}=\&cleanup;

Modified: trunk/libtest-www-mechanize-perl/t/has_tag.t
URL: http://svn.debian.org/wsvn/trunk/libtest-www-mechanize-perl/t/has_tag.t?rev=9031&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/t/has_tag.t (original)
+++ trunk/libtest-www-mechanize-perl/t/has_tag.t Thu Nov  8 13:02:57 2007
@@ -1,4 +1,4 @@
-#!perl -Tw
+#!perl -w
 
 use strict;
 use warnings;

Modified: trunk/libtest-www-mechanize-perl/t/link_content.t
URL: http://svn.debian.org/wsvn/trunk/libtest-www-mechanize-perl/t/link_content.t?rev=9031&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/t/link_content.t (original)
+++ trunk/libtest-www-mechanize-perl/t/link_content.t Thu Nov  8 13:02:57 2007
@@ -1,8 +1,8 @@
-#!perl -T
+#!perl
 
 use strict;
 use warnings;
-use Test::More tests => 9;
+use Test::More tests => 10;
 use Test::Builder::Tester;
 use URI::file;
 
@@ -14,9 +14,9 @@
     use_ok( 'Test::WWW::Mechanize' );
 }
 
-my $server=TWMServer->new(PORT);
-my $pid=$server->background;
-ok($pid,'HTTP Server started') or die "Can't start the server";
+my $server = TWMServer->new(PORT);
+my $pid = $server->background;
+ok( $pid, 'HTTP Server started' ) or die "Can't start the server";
 
 sub cleanup { kill(9,$pid) if !$^S };
 $SIG{__DIE__}=\&cleanup;
@@ -24,11 +24,14 @@
 my $mech=Test::WWW::Mechanize->new();
 isa_ok($mech,'Test::WWW::Mechanize');
 
+# HTTP::Server::Simple->background() may return prematurely.
+sleep 1;
 $mech->get('http://localhost:'.PORT.'/goodlinks.html');
 my @urls=$mech->links();
+ok(@urls, 'Got links from the HTTP server');
 
 # test regex
-test_out('not ok 1 - link_content_like'); 
+test_out('not ok 1 - link_content_like');
 test_fail(+2);
 test_diag("     'blah' doesn't look much like a regex to me.");
 $mech->link_content_like(\@urls,'blah','Testing the regex');
@@ -70,11 +73,11 @@
 
 cleanup();
 
-{
-  package TWMServer;
-  use base 'HTTP::Server::Simple::CGI';
 
-  sub handle_request {
+package TWMServer;
+use base 'HTTP::Server::Simple::CGI';
+
+sub handle_request {
     my $self=shift;
     my $cgi=shift;
 
@@ -82,14 +85,13 @@
     $file=~s/\s+//g;
 
     if(-r "t/html/$file") {
-      if(my $response=do { local (@ARGV, $/) = "t/html/$file"; <> }) {
-        print "HTTP/1.0 200 OK\r\n";
-        print "Content-Type: text/html\r\nContent-Length: ",
-          length($response), "\r\n\r\n", $response;
-        return;
-      }
+        if(my $response=do { local (@ARGV, $/) = "t/html/$file"; <> }) {
+            print "HTTP/1.0 200 OK\r\n";
+            print "Content-Type: text/html\r\nContent-Length: ",
+                    length($response), "\r\n\r\n", $response;
+            return;
+        }
     }
 
     print "HTTP/1.0 404 Not Found\r\n\r\n";
-  }
 }

Modified: trunk/libtest-www-mechanize-perl/t/link_status.t
URL: http://svn.debian.org/wsvn/trunk/libtest-www-mechanize-perl/t/link_status.t?rev=9031&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/t/link_status.t (original)
+++ trunk/libtest-www-mechanize-perl/t/link_status.t Thu Nov  8 13:02:57 2007
@@ -1,4 +1,4 @@
-#!perl -T
+#!perl
 
 use strict;
 use warnings;

Modified: trunk/libtest-www-mechanize-perl/t/links_ok.t
URL: http://svn.debian.org/wsvn/trunk/libtest-www-mechanize-perl/t/links_ok.t?rev=9031&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/t/links_ok.t (original)
+++ trunk/libtest-www-mechanize-perl/t/links_ok.t Thu Nov  8 13:02:57 2007
@@ -1,4 +1,4 @@
-#!perl -T
+#!perl
 
 use strict;
 use warnings;

Modified: trunk/libtest-www-mechanize-perl/t/new.t
URL: http://svn.debian.org/wsvn/trunk/libtest-www-mechanize-perl/t/new.t?rev=9031&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/t/new.t (original)
+++ trunk/libtest-www-mechanize-perl/t/new.t Thu Nov  8 13:02:57 2007
@@ -1,4 +1,4 @@
-#!perl -T
+#!perl
 
 use warnings;
 use strict;

Modified: trunk/libtest-www-mechanize-perl/t/page_links_content.t
URL: http://svn.debian.org/wsvn/trunk/libtest-www-mechanize-perl/t/page_links_content.t?rev=9031&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/t/page_links_content.t (original)
+++ trunk/libtest-www-mechanize-perl/t/page_links_content.t Thu Nov  8 13:02:57 2007
@@ -1,4 +1,4 @@
-#!perl -T
+#!perl
 
 use strict;
 use warnings;

Modified: trunk/libtest-www-mechanize-perl/t/page_links_ok.t
URL: http://svn.debian.org/wsvn/trunk/libtest-www-mechanize-perl/t/page_links_ok.t?rev=9031&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/t/page_links_ok.t (original)
+++ trunk/libtest-www-mechanize-perl/t/page_links_ok.t Thu Nov  8 13:02:57 2007
@@ -1,4 +1,4 @@
-#!perl -T
+#!perl
 
 use strict;
 use warnings;

Modified: trunk/libtest-www-mechanize-perl/t/pod-coverage.t
URL: http://svn.debian.org/wsvn/trunk/libtest-www-mechanize-perl/t/pod-coverage.t?rev=9031&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/t/pod-coverage.t (original)
+++ trunk/libtest-www-mechanize-perl/t/pod-coverage.t Thu Nov  8 13:02:57 2007
@@ -1,4 +1,4 @@
-#!perl -T
+#!perl
 
 use Test::More;
 eval "use Test::Pod::Coverage 0.08";

Modified: trunk/libtest-www-mechanize-perl/t/pod.t
URL: http://svn.debian.org/wsvn/trunk/libtest-www-mechanize-perl/t/pod.t?rev=9031&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/t/pod.t (original)
+++ trunk/libtest-www-mechanize-perl/t/pod.t Thu Nov  8 13:02:57 2007
@@ -1,4 +1,4 @@
-#!perl -T
+#!perl
 
 use strict;
 use warnings;

Modified: trunk/libtest-www-mechanize-perl/t/stuff_inputs.t
URL: http://svn.debian.org/wsvn/trunk/libtest-www-mechanize-perl/t/stuff_inputs.t?rev=9031&op=diff
==============================================================================
--- trunk/libtest-www-mechanize-perl/t/stuff_inputs.t (original)
+++ trunk/libtest-www-mechanize-perl/t/stuff_inputs.t Thu Nov  8 13:02:57 2007
@@ -1,4 +1,4 @@
-#!perl -Tw
+#!perl -w
 
 use strict;
 use warnings;




More information about the Pkg-perl-cvs-commits mailing list