]> sjero.net Git - wget/commitdiff
improved Test-idn-robots.px
authorTim Ruehsen <tim.ruehsen@gmx.de>
Mon, 7 Oct 2013 21:37:42 +0000 (23:37 +0200)
committerGiuseppe Scrivano <gscrivan@redhat.com>
Mon, 7 Oct 2013 21:58:53 +0000 (23:58 +0200)
tests/ChangeLog
tests/Test-idn-robots.px

index 9a58797a7f3391b28ce2fefc9f30069e98f98060..9723752560cec44a5a292ed33a9f8574db6815b8 100644 (file)
@@ -1,3 +1,8 @@
+2013-10-07  Tim Ruehsen <tim.ruehsen@gmx.de>
+
+       * Test-idn-robots.px: added punycoded and escaped URLs to follow
+         removed -H
+
 2013-08-22  Tim Ruehsen <tim.ruehsen@gmx.de>
 
        * Makefile.am (EXTRA_DIST): Add Test--httpsonly-r.px.
 2013-08-22  Tim Ruehsen <tim.ruehsen@gmx.de>
 
        * Makefile.am (EXTRA_DIST): Add Test--httpsonly-r.px.
index fb060c4ff6ffe4ba0f7120f43429053b18eab70d..ae22b7cd7134359e5df0cb9980e35f63a7b5b6dc 100755 (executable)
@@ -9,11 +9,14 @@ use HTTPTest;
 # " Kon'nichiwa <dot> Japan
 my $euc_jp_hostname = "\272\243\306\374\244\317.\306\374\313\334";
 my $punycoded_hostname = 'xn--v9ju72g90p.xn--wgv71a';
 # " Kon'nichiwa <dot> Japan
 my $euc_jp_hostname = "\272\243\306\374\244\317.\306\374\313\334";
 my $punycoded_hostname = 'xn--v9ju72g90p.xn--wgv71a';
+my $escaped_hostname = "%ba%a3%c6%fc%a4%cf.%c6%fc%cb%dc";
 
 ###############################################################################
 
 my $starter_file = <<EOF;
 <a href="http://$euc_jp_hostname/foo.txt">The link</a>
 
 ###############################################################################
 
 my $starter_file = <<EOF;
 <a href="http://$euc_jp_hostname/foo.txt">The link</a>
+<a href="http://$punycoded_hostname/foo2.txt">The second link</a>
+<a href="http://$escaped_hostname/foo3.txt">The third link</a>
 EOF
 
 my $result_file = <<EOF;
 EOF
 
 my $result_file = <<EOF;
@@ -38,6 +41,22 @@ my %urls = (
         },
         content => $result_file,
     },
         },
         content => $result_file,
     },
+    "http://$punycoded_hostname/foo2.txt" => {
+        code => "200",
+        msg => "Uh-huh2",
+        headers => {
+            'Content-Type' => 'text/plain',
+        },
+        content => $result_file,
+    },
+    "http://$punycoded_hostname/foo3.txt" => {
+        code => "200",
+        msg => "Uh-huh3",
+        headers => {
+            'Content-Type' => 'text/plain',
+        },
+        content => $result_file,
+    },
     "http://$punycoded_hostname/robots.txt" => {
         code => "200",
         msg => "Uh-huh",
     "http://$punycoded_hostname/robots.txt" => {
         code => "200",
         msg => "Uh-huh",
@@ -48,7 +67,7 @@ my %urls = (
     },
 );
 
     },
 );
 
-my $cmdline = $WgetTest::WGETPATH . " --iri -rH"
+my $cmdline = $WgetTest::WGETPATH . " --iri -r"
     . " -e http_proxy=localhost:{{port}} --local-encoding=EUC-JP"
     . " http://$euc_jp_hostname/";
 
     . " -e http_proxy=localhost:{{port}} --local-encoding=EUC-JP"
     . " http://$euc_jp_hostname/";
 
@@ -61,6 +80,12 @@ my %expected_downloaded_files = (
     "$punycoded_hostname/foo.txt" => {
         content => $result_file,
     },
     "$punycoded_hostname/foo.txt" => {
         content => $result_file,
     },
+    "$punycoded_hostname/foo2.txt" => {
+        content => $result_file,
+    },
+    "$punycoded_hostname/foo3.txt" => {
+        content => $result_file,
+    },
     "$punycoded_hostname/robots.txt" => {
         content => '',
     },
     "$punycoded_hostname/robots.txt" => {
         content => '',
     },