6 use WgetFeature qw(iri);
9 # Just a sanity check to verify that %-encoded values are always left
12 my $ccedilla_l15 = "\xE7";
13 my $ccedilla_l15_pct = "%E7";
14 my $eacute_l1 = "\xE9";
15 my $eacute_u8 = "\xC3\xA9";
16 my $eacute_u8_pct = "%C3%A9";
18 my $pageindex = <<EOF;
21 <title>Main Page</title>
26 href="http://localhost:{{port}}/hello_${ccedilla_l15_pct}${eacute_l1}.html">La seule page en français</a>.
32 my $pagefrancais = <<EOF;
35 <title>La seule page en français</title>
36 <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
45 # code, msg, headers, content
51 "Content-type" => "text/html; charset=ISO-8859-15",
53 content => $pageindex,
55 "/hello_${ccedilla_l15_pct}${eacute_u8_pct}.html" => {
59 "Content-type" => "text/html; charset=UTF-8",
61 content => $pagefrancais,
65 my $cmdline = $WgetTest::WGETPATH . " --iri -e robots=off --restrict-file-names=nocontrol -nH -r http://localhost:{{port}}/";
67 my $expected_error_code = 0;
69 my %expected_downloaded_files = (
71 content => $pageindex,
73 "hello_${ccedilla_l15}${eacute_u8}.html" => {
74 content => $pagefrancais,
78 ###############################################################################
80 my $the_test = HTTPTest->new (name => "Test-iri-percent",
83 errcode => $expected_error_code,
84 output => \%expected_downloaded_files);
85 exit $the_test->run();