8 # " Kon'nichiwa <dot> Japan
9 my $euc_jp_hostname = "\272\243\306\374\244\317.\306\374\313\334";
10 my $punycoded_hostname = 'xn--v9ju72g90p.xn--wgv71a';
12 ###############################################################################
14 my $starter_file = <<EOF;
15 <a href="http://$euc_jp_hostname/foo.txt">The link</a>
18 my $result_file = <<EOF;
22 # code, msg, headers, content
24 "http://$punycoded_hostname/index.html" => {
28 'Content-Type' => 'text/html; charset=EUC-JP',
30 content => $starter_file,
32 "http://$punycoded_hostname/foo.txt" => {
36 'Content-Type' => 'text/plain',
38 content => $result_file,
40 "http://$punycoded_hostname/robots.txt" => {
44 'Content-Type' => 'text/plain',
50 my $cmdline = $WgetTest::WGETPATH . " --debug --iri -rH"
51 . " -e http_proxy=localhost:{{port}} --locale=EUC-JP"
52 . " http://$euc_jp_hostname/";
54 my $expected_error_code = 0;
56 my %expected_downloaded_files = (
57 "$punycoded_hostname/index.html" => {
58 content => $starter_file,
60 "$punycoded_hostname/foo.txt" => {
61 content => $result_file,
63 "$punycoded_hostname/robots.txt" => {
68 ###############################################################################
70 my $the_test = HTTPTest->new (name => "Test-idn-robots",
73 errcode => $expected_error_code,
74 output => \%expected_downloaded_files);
75 exit $the_test->run();