Test-idn-cmd.px.

This commit is contained in:
Micah Cowan 2008-09-09 21:55:02 -07:00
parent 171c71e09c
commit 523c3dfcbc
3 changed files with 57 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2008-09-09 Micah Cowan <micah@cowan.name>
* Test-idn-cmd.px: Added.
* run-px: Added Test-idn-cmd.px.
2008-08-28 Micah Cowan <micah@cowan.name>
* HTTPServer.pm (run): Allow distinguishing between hostnames,

50
tests/Test-idn-cmd.px Executable file
View File

@ -0,0 +1,50 @@
#!/usr/bin/perl -w
use strict;
use HTTPTest;
# " Kon'nichiwa <dot> Japan
my $euc_jp_hostname = "\272\243\306\374\244\317.\306\374\313\334";
my $punycoded_hostname = 'xn--v9ju72g90p.xn--wgv71a';
###############################################################################
my $result_file = <<EOF;
Found me!
EOF
# code, msg, headers, content
my %urls = (
"http://$punycoded_hostname/index.html" => {
code => "200",
msg => "Yes, please",
headers => {
'Content-Type' => 'text/plain',
},
content => $result_file,
},
);
my $cmdline = $WgetTest::WGETPATH . " --debug --iri -rH"
. " -e http_proxy=localhost:{{port}} --locale=EUC-JP $euc_jp_hostname";
my $expected_error_code = 0;
my %expected_downloaded_files = (
"$punycoded_hostname/index.html" => {
content => $result_file,
},
);
###############################################################################
my $the_test = HTTPTest->new (name => "Test-iri-cmd",
input => \%urls,
cmdline => $cmdline,
errcode => $expected_error_code,
output => \%expected_downloaded_files);
exit $the_test->run();
# vim: et ts=4 sw=4

View File

@ -25,6 +25,7 @@ my @tests = (
'Test-HTTP-Content-Disposition.px',
'Test-idn-headers.px',
'Test-idn-meta.px',
'Test-idn-cmd.px',
'Test-iri.px',
'Test-iri-disabled.px',
'Test-iri-forced-remote.px',