]> sjero.net Git - wget/commitdiff
[svn] Minor fixes to test suite.
authormtortonesi <devnull@localhost>
Wed, 27 Dec 2006 09:00:12 +0000 (01:00 -0800)
committermtortonesi <devnull@localhost>
Wed, 27 Dec 2006 09:00:12 +0000 (01:00 -0800)
tests/ChangeLog
tests/HTTPServer.pm
tests/Test-HTTP-Content-Disposition-1.px
tests/Test-HTTP-Content-Disposition-2.px
tests/Test-HTTP-Content-Disposition.px
tests/Test-O-nonexisting.px
tests/Test-Restrict-Lowercase.px
tests/Test-Restrict-Uppercase.px
tests/Test-np.px
tests/Test.pm

index 618e6563cb6176d6345290dc984be473fb3d14b2..132472fb5801e83f99007c41f712c805a4ce833e 100644 (file)
@@ -1,3 +1,7 @@
+2006-12-22  Mauro Tortonesi  <mauro@ferrara.linux.it>
+
+       * HTTPTest.pm: Don't ignore initial '/' character in requested URLs.
+
 2006-11-10  Mauro Tortonesi  <mauro@ferrara.linux.it>
 
        * Test-np.px: Added test for -np.
index 2d56160a16f708558de817fc3084a9f119bbd5c0..d29ea307f5dcbc80cbdb1389be5cb6811d8efa16 100755 (executable)
@@ -32,9 +32,9 @@ sub run {
             if ($url_path =~ m{/$}) { # append 'index.html'
                 $url_path .= 'index.html';
             }
-            if ($url_path =~ m{^/}) { # remove trailing '/'
-                $url_path = substr ($url_path, 1);
-            }
+            #if ($url_path =~ m{^/}) { # remove trailing '/'
+            #    $url_path = substr ($url_path, 1);
+            #}
             if ($log) {
                 print STDERR "Method: ", $req->method, "\n";
                 print STDERR "Path: ", $url_path, "\n";
index 3727ad162187647579d4a8492241830ccbefb1d1..da27e3e1d899cd874eb76b3b5bd386921fcdd8df 100755 (executable)
@@ -64,7 +64,7 @@ my %expected_downloaded_files = (
 
 ###############################################################################
 
-my $the_test = HTTPTest->new (name => "Test6",
+my $the_test = HTTPTest->new (name => "Test-HTTP-Content-Disposition-1",
                               input => \%urls, 
                               cmdline => $cmdline, 
                               errcode => $expected_error_code, 
index 8064f76bf2ef1da96d007bed66a49c29b5270fa3..589329f56df560e68d9490da051dd1bb0970cf9f 100755 (executable)
@@ -64,7 +64,7 @@ my %expected_downloaded_files = (
 
 ###############################################################################
 
-my $the_test = HTTPTest->new (name => "Test7",
+my $the_test = HTTPTest->new (name => "Test-HTTP-Content-Disposition-2",
                               input => \%urls, 
                               cmdline => $cmdline, 
                               errcode => $expected_error_code, 
index c9bc62fa9d0d5d2b00c17e860260359205bd13ef..465c43fba66a53791e7e0eeb7c57a8a47451642b 100755 (executable)
@@ -45,7 +45,7 @@ my %expected_downloaded_files = (
 
 ###############################################################################
 
-my $the_test = HTTPTest->new (name => "Test5",
+my $the_test = HTTPTest->new (name => "Test-HTTP-Content-Disposition",
                               input => \%urls, 
                               cmdline => $cmdline, 
                               errcode => $expected_error_code, 
index 676bd5f4e3ee41fdd147e1265c9b7ff88c2a0354..b341b7f16373958e7b8ca2b9488aee7ced921ce9 100755 (executable)
@@ -35,7 +35,7 @@ my %expected_downloaded_files = (
 
 ###############################################################################
 
-my $the_test = HTTPTest->new (name => "Test4",
+my $the_test = HTTPTest->new (name => "Test-O-nonexisting",
                               input => \%urls, 
                               cmdline => $cmdline, 
                               errcode => $expected_error_code, 
index 98c8ed60845c41caac943341290bc0ae8eab4065..035b47a8e5cc6f1afa3a8c2b91dfc90862687f87 100755 (executable)
@@ -44,7 +44,7 @@ my %expected_downloaded_files = (
 
 ###############################################################################
 
-my $the_test = HTTPTest->new (name => "Test9",
+my $the_test = HTTPTest->new (name => "Test-Restrict-Lowercase",
                               input => \%urls, 
                               cmdline => $cmdline, 
                               errcode => $expected_error_code, 
index e2294030b089b78fdd6f7cfe98e811a4d972143e..05e5bcde014f4916ec47a04bf81d5ec89051a3ec 100755 (executable)
@@ -44,7 +44,7 @@ my %expected_downloaded_files = (
 
 ###############################################################################
 
-my $the_test = HTTPTest->new (name => "Test9",
+my $the_test = HTTPTest->new (name => "Test-Restrict-Uppercase",
                               input => \%urls, 
                               cmdline => $cmdline, 
                               errcode => $expected_error_code, 
index 09b77da4cc5321bb2b4e70ef474a6e639a660f31..dcb165fda033a21a2867301d57ae3e65e891b3dc 100755 (executable)
@@ -77,7 +77,7 @@ EOF
 
 # code, msg, headers, content
 my %urls = (
-    'firstlevel/index.html' => {
+    '/firstlevel/index.html' => {
         code => "200",
         msg => "Dontcare",
         headers => {
@@ -85,7 +85,7 @@ my %urls = (
         },
         content => $mainpage,
     },
-    'firstlevel/secondpage.html' => {
+    '/firstlevel/secondpage.html' => {
         code => "200",
         msg => "Dontcare",
         headers => {
@@ -93,7 +93,7 @@ my %urls = (
         },
         content => $secondpage,
     },
-    'firstlevel/lowerlevel/thirdpage.html' => {
+    '/firstlevel/lowerlevel/thirdpage.html' => {
         code => "200",
         msg => "Dontcare",
         headers => {
@@ -101,7 +101,7 @@ my %urls = (
         },
         content => $thirdpage,
     },
-    'firstlevel/fourthpage.html' => {
+    '/firstlevel/fourthpage.html' => {
         code => "200",
         msg => "Dontcare",
         headers => {
@@ -109,7 +109,7 @@ my %urls = (
         },
         content => $fourthpage,
     },
-    'higherlevelpage.html' => {
+    '/higherlevelpage.html' => {
         code => "200",
         msg => "Dontcare",
         headers => {
index 058a7c505807dff05a65f936e46e2683e4f85b56..f1934de4f3f5be51df1f6d3cf400c449161b4c21 100755 (executable)
@@ -21,16 +21,16 @@ my @unexpected_downloads = ();
         _output       => {},
     );
     
-       sub _default_for
-       {
-               my ($self, $attr) = @_;
-               $_attr_data{$attr};
-       }
-
-       sub _standard_keys 
-       {
-               keys %_attr_data;
-       }
+    sub _default_for
+    {
+        my ($self, $attr) = @_;
+        $_attr_data{$attr};
+    }
+
+    sub _standard_keys 
+    {
+        keys %_attr_data;
+    }
 }