mirror of
https://github.com/mirror/wget.git
synced 2024-12-28 05:40:08 +08:00
[svn] Minor fixes to test suite.
This commit is contained in:
parent
3f51773542
commit
92b2323253
@ -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>
|
2006-11-10 Mauro Tortonesi <mauro@ferrara.linux.it>
|
||||||
|
|
||||||
* Test-np.px: Added test for -np.
|
* Test-np.px: Added test for -np.
|
||||||
|
@ -32,9 +32,9 @@ sub run {
|
|||||||
if ($url_path =~ m{/$}) { # append 'index.html'
|
if ($url_path =~ m{/$}) { # append 'index.html'
|
||||||
$url_path .= 'index.html';
|
$url_path .= 'index.html';
|
||||||
}
|
}
|
||||||
if ($url_path =~ m{^/}) { # remove trailing '/'
|
#if ($url_path =~ m{^/}) { # remove trailing '/'
|
||||||
$url_path = substr ($url_path, 1);
|
# $url_path = substr ($url_path, 1);
|
||||||
}
|
#}
|
||||||
if ($log) {
|
if ($log) {
|
||||||
print STDERR "Method: ", $req->method, "\n";
|
print STDERR "Method: ", $req->method, "\n";
|
||||||
print STDERR "Path: ", $url_path, "\n";
|
print STDERR "Path: ", $url_path, "\n";
|
||||||
|
@ -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,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
|
@ -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,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
|
@ -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,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
|
@ -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,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
|
@ -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,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
|
@ -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,
|
input => \%urls,
|
||||||
cmdline => $cmdline,
|
cmdline => $cmdline,
|
||||||
errcode => $expected_error_code,
|
errcode => $expected_error_code,
|
||||||
|
@ -77,7 +77,7 @@ EOF
|
|||||||
|
|
||||||
# code, msg, headers, content
|
# code, msg, headers, content
|
||||||
my %urls = (
|
my %urls = (
|
||||||
'firstlevel/index.html' => {
|
'/firstlevel/index.html' => {
|
||||||
code => "200",
|
code => "200",
|
||||||
msg => "Dontcare",
|
msg => "Dontcare",
|
||||||
headers => {
|
headers => {
|
||||||
@ -85,7 +85,7 @@ my %urls = (
|
|||||||
},
|
},
|
||||||
content => $mainpage,
|
content => $mainpage,
|
||||||
},
|
},
|
||||||
'firstlevel/secondpage.html' => {
|
'/firstlevel/secondpage.html' => {
|
||||||
code => "200",
|
code => "200",
|
||||||
msg => "Dontcare",
|
msg => "Dontcare",
|
||||||
headers => {
|
headers => {
|
||||||
@ -93,7 +93,7 @@ my %urls = (
|
|||||||
},
|
},
|
||||||
content => $secondpage,
|
content => $secondpage,
|
||||||
},
|
},
|
||||||
'firstlevel/lowerlevel/thirdpage.html' => {
|
'/firstlevel/lowerlevel/thirdpage.html' => {
|
||||||
code => "200",
|
code => "200",
|
||||||
msg => "Dontcare",
|
msg => "Dontcare",
|
||||||
headers => {
|
headers => {
|
||||||
@ -101,7 +101,7 @@ my %urls = (
|
|||||||
},
|
},
|
||||||
content => $thirdpage,
|
content => $thirdpage,
|
||||||
},
|
},
|
||||||
'firstlevel/fourthpage.html' => {
|
'/firstlevel/fourthpage.html' => {
|
||||||
code => "200",
|
code => "200",
|
||||||
msg => "Dontcare",
|
msg => "Dontcare",
|
||||||
headers => {
|
headers => {
|
||||||
@ -109,7 +109,7 @@ my %urls = (
|
|||||||
},
|
},
|
||||||
content => $fourthpage,
|
content => $fourthpage,
|
||||||
},
|
},
|
||||||
'higherlevelpage.html' => {
|
'/higherlevelpage.html' => {
|
||||||
code => "200",
|
code => "200",
|
||||||
msg => "Dontcare",
|
msg => "Dontcare",
|
||||||
headers => {
|
headers => {
|
||||||
|
@ -21,16 +21,16 @@ my @unexpected_downloads = ();
|
|||||||
_output => {},
|
_output => {},
|
||||||
);
|
);
|
||||||
|
|
||||||
sub _default_for
|
sub _default_for
|
||||||
{
|
{
|
||||||
my ($self, $attr) = @_;
|
my ($self, $attr) = @_;
|
||||||
$_attr_data{$attr};
|
$_attr_data{$attr};
|
||||||
}
|
}
|
||||||
|
|
||||||
sub _standard_keys
|
sub _standard_keys
|
||||||
{
|
{
|
||||||
keys %_attr_data;
|
keys %_attr_data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user