1- # !perl -w
1+ # !perl
22
33use strict;
4+ use warnings;
45
5- use Test qw( plan ok) ;
6- plan tests => 15;
7-
6+ use Test::More tests => 15;
87use HTML::Form;
98
109my @warn ;
@@ -18,32 +17,32 @@ my $f = HTML::Form->parse(<<'EOT', "http://localhost/");
1817<form></form>
1918EOT
2019
21- ok ($f -> value(" name" ), " " );
22- ok ($f -> accept_charset, " UNKNOWN" );
20+ is ($f -> value(" name" ), " " );
21+ is ($f -> accept_charset, " UNKNOWN" );
2322my $req = $f -> click;
24- ok ($req -> uri, " http://localhost/abc?name=&latin=" );
23+ is ($req -> uri, " http://localhost/abc?name=&latin=" );
2524
2625$f -> value(name => " \x{0424} " ); # capital cyrillic ef
2726$f -> value(latin => " \xE5 " ); # aring
2827$req = $f -> click;
29- ok ($req -> method, " GET" );
30- ok ($req -> uri, " http://localhost/abc?name=%D0%A4 &latin=%C3%A5 " );
28+ is ($req -> method, " GET" );
29+ is ($req -> uri, " http://localhost/abc?name=%D0%A4 &latin=%C3%A5 " );
3130
3231$f -> method(' POST' );
3332$f -> enctype(' multipart/form-data' );
3433
3534$req = $f -> click;
36- ok ($req -> uri, " http://localhost/abc" );
37- ok ($req -> content, " --xYzZY\r\n Content-Disposition: form-data; name=\" name\"\r\n\r\n\xD0\xA4\r\n --xYzZY\r\n Content-Disposition: form-data; name=\" latin\"\r\n\r\n\xC3\xA5\r\n --xYzZY--\r\n " );
35+ is ($req -> uri, " http://localhost/abc" );
36+ is ($req -> content, " --xYzZY\r\n Content-Disposition: form-data; name=\" name\"\r\n\r\n\xD0\xA4\r\n --xYzZY\r\n Content-Disposition: form-data; name=\" latin\"\r\n\r\n\xC3\xA5\r\n --xYzZY--\r\n " );
3837
3938$f -> accept_charset(' koi8-r' );
4039$req = $f -> click;
41- ok ($req -> uri, " http://localhost/abc" );
42- ok ($req -> content, " --xYzZY\r\n Content-Disposition: form-data; name=\" name\"\r\n\r\n\xE6\r\n --xYzZY\r\n Content-Disposition: form-data; name=\" latin\"\r\n\r\n ?\r\n --xYzZY--\r\n " );
40+ is ($req -> uri, " http://localhost/abc" );
41+ is ($req -> content, " --xYzZY\r\n Content-Disposition: form-data; name=\" name\"\r\n\r\n\xE6\r\n --xYzZY\r\n Content-Disposition: form-data; name=\" latin\"\r\n\r\n ?\r\n --xYzZY--\r\n " );
4342
4443$f -> method(' GET' );
4544$req = $f -> click;
46- ok ($req -> uri, " http://localhost/abc?name=%E6 &latin=%3F" );
45+ is ($req -> uri, " http://localhost/abc?name=%E6 &latin=%3F" );
4746
4847$f = HTML::Form-> parse(<<'EOT' , " http://localhost/" );
4948<form action="abc" name="foo" accept-charset="koi8-r">
@@ -52,16 +51,16 @@ $f = HTML::Form->parse(<<'EOT', "http://localhost/");
5251<form></form>
5352EOT
5453
55- ok ($f -> accept_charset, ' koi8-r' );
54+ is ($f -> accept_charset, ' koi8-r' );
5655
5756$f -> value(name => " \x{0425} " ); # capital cyrillic kha
5857$req = $f -> click;
59- ok ($req -> method, " GET" );
60- ok ($req -> uri, " http://localhost/abc?name=%E8 " );
58+ is ($req -> method, " GET" );
59+ is ($req -> uri, " http://localhost/abc?name=%E8 " );
6160
6261$f -> method(' POST' );
6362$f -> enctype(' multipart/form-data' );
6463
6564$req = $f -> click;
66- ok ($req -> uri, " http://localhost/abc" );
67- ok ($req -> content, " --xYzZY\r\n Content-Disposition: form-data; name=\" name\"\r\n\r\n\xE8\r\n --xYzZY--\r\n " );
65+ is ($req -> uri, " http://localhost/abc" );
66+ is ($req -> content, " --xYzZY\r\n Content-Disposition: form-data; name=\" name\"\r\n\r\n\xE8\r\n --xYzZY--\r\n " );
0 commit comments