6
use WgetFeature qw(iri);
9
# " Kon'nichiwa <dot> Japan
10
my $euc_jp_hostname = "\272\243\306\374\244\317.\306\374\313\334";
11
my $punycoded_hostname = 'xn--v9ju72g90p.xn--wgv71a';
13
###############################################################################
15
my $starter_file = <<EOF;
16
<a href="http://$euc_jp_hostname/foo.txt">The link</a>
19
my $result_file = <<EOF;
23
# code, msg, headers, content
25
"http://$punycoded_hostname/index.html" => {
29
'Content-Type' => 'text/html; charset=EUC-JP',
31
content => $starter_file,
33
"http://$punycoded_hostname/foo.txt" => {
37
'Content-Type' => 'text/plain',
39
content => $result_file,
41
"http://$punycoded_hostname/robots.txt" => {
45
'Content-Type' => 'text/plain',
51
my $cmdline = $WgetTest::WGETPATH . " --debug --iri -rH"
52
. " -e http_proxy=localhost:{{port}} --local-encoding=EUC-JP"
53
. " http://$euc_jp_hostname/";
55
my $expected_error_code = 0;
57
my %expected_downloaded_files = (
58
"$punycoded_hostname/index.html" => {
59
content => $starter_file,
61
"$punycoded_hostname/foo.txt" => {
62
content => $result_file,
64
"$punycoded_hostname/robots.txt" => {
69
###############################################################################
71
my $the_test = HTTPTest->new (name => "Test-idn-robots",
74
errcode => $expected_error_code,
75
output => \%expected_downloaded_files);
76
exit $the_test->run();