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
<meta http-equiv="Content-Type" content="text/html; charset=EUC-JP" />
17
<a href="http://$euc_jp_hostname/">The link</a>
20
my $result_file = <<EOF;
24
# code, msg, headers, content
26
'http://start-here.com/start.html' => {
28
msg => "You want fries with that?",
30
'Content-Type' => 'text/html; charset=UTF-8',
32
content => $starter_file,
34
"http://$punycoded_hostname/index.html" => {
38
'Content-Type' => 'text/plain',
40
content => $result_file,
44
my $cmdline = $WgetTest::WGETPATH . " --debug --iri -rH"
45
. " -e http_proxy=localhost:{{port}} http://start-here.com/start.html";
47
my $expected_error_code = 0;
49
my %expected_downloaded_files = (
50
'start-here.com/start.html' => {
51
content => $starter_file,
53
"$punycoded_hostname/index.html" => {
54
content => $result_file,
58
###############################################################################
60
my $the_test = HTTPTest->new (name => "Test-idn-meta",
63
errcode => $expected_error_code,
64
output => \%expected_downloaded_files);
65
exit $the_test->run();