]> sjero.net Git - wget/blobdiff - tests/Test-iri.px
NEWS: cite --start-pos
[wget] / tests / Test-iri.px
index 738c304a95fa82ceef274c40b2a6fe5e1661dcef..4865a1cd29ddc089138ae6f2e01c93f900d7f322 100755 (executable)
@@ -1,8 +1,9 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
 
 use strict;
 use warnings;
 
+use WgetFeature qw(iri);
 use HTTPTest;
 
 # cf. http://en.wikipedia.org/wiki/Latin1
@@ -148,14 +149,9 @@ my %urls = (
     '/p2_%C3%A9%C3%A9n.html' => {      # UTF-8 encoded
         code => "200",
         msg => "Ok",
-        headers => {
-            "Content-type" => "text/html; charset=ISO-8859-1",
+        request_headers => {
+            "Referer" => qr|http://localhost:[0-9]+/p1_fran%E7ais.html|,
         },
-        content => $pageeen,
-    },
-    '/p2_%E9%E9n.html' => {
-        code => "200",
-        msg => "Ok",
         headers => {
             "Content-type" => "text/html; charset=ISO-8859-1",
         },
@@ -180,6 +176,9 @@ my %urls = (
     '/p4_m%C3%A9%C3%A9r.html' => {
         code => "200",
         msg => "Ok",
+        request_headers => {
+            "Referer" => qr|http://localhost:[0-9]+/p2_%C3%A9%C3%A9n.html|,
+        },
         headers => {
             "Content-type" => "text/plain; charset=UTF-8",
         },
@@ -187,7 +186,7 @@ my %urls = (
     },
 );
 
-my $cmdline = $WgetTest::WGETPATH . " --iri --restrict-file-names=nocontrol -nH -r http://localhost:{{port}}/";
+my $cmdline = $WgetTest::WGETPATH . " --iri --trust-server-names --restrict-file-names=nocontrol -nH -r http://localhost:{{port}}/";
 
 my $expected_error_code = 0;