Debian lenny version packages
[pkg-perl] / deb-src / libwww-mechanize-perl / libwww-mechanize-perl-1.34 / t / form-parsing.t
1 #!perl -Tw
2
3 use strict;
4 use warnings;
5 use Test::More tests=>1;
6 use HTML::Form;
7
8 my $base = 'http://localhost/';
9 my $content = do { local $/ = undef; <DATA> };
10
11 my $forms = [ HTML::Form->parse( $content, $base ) ];
12 is( scalar @{$forms}, 1, 'Find one form, please' );
13
14 __DATA__
15 <html>
16 <head>
17 <title>WWW::Mechanize::Shell test page</title>
18 </head>
19 <body>
20   <form name="f" action="/formsubmit">
21     <input type="checkbox" name="cat" value="cat_baz"  />
22   </form>
23 </body>
24 </html>
25