mirror of
https://github.com/mirror/wget.git
synced 2025-03-14 03:40:15 +08:00
Delete some redundant tests
* tests/Makefile.am: Remove some tests that are redundant with the Python testenv * tests/Test-auth-basic.px: Delete file * tests/Test-auth-no-challenge.px: Same * tests/Test-auth-no-challenge-url.px: Same * tests/Test-auth-retcode.px: Same * tests/Test-auth-with-content-disposition.px: Same * tests/Test-k.px: Same
This commit is contained in:
parent
0e0cdc2409
commit
3aa53a6220
@ -44,11 +44,6 @@
|
||||
cd ../lib && $(MAKE) $(AM_MAKEFLAGS)
|
||||
|
||||
PX_TESTS = \
|
||||
Test-auth-basic.px \
|
||||
Test-auth-no-challenge.px \
|
||||
Test-auth-no-challenge-url.px \
|
||||
Test-auth-with-content-disposition.px \
|
||||
Test-auth-retcode.px \
|
||||
Test-c-full.px \
|
||||
Test-c-partial.px \
|
||||
Test-c.px \
|
||||
@ -89,7 +84,6 @@ PX_TESTS = \
|
||||
Test-iri-disabled.px \
|
||||
Test-iri-forced-remote.px \
|
||||
Test-iri-list.px \
|
||||
Test-k.px \
|
||||
Test-meta-robots.px \
|
||||
Test-N-current.px \
|
||||
Test-N-HTTP-Content-Disposition.px \
|
||||
|
@ -1,47 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use HTTPTest;
|
||||
|
||||
|
||||
###############################################################################
|
||||
|
||||
my $wholefile = "You're all authenticated.\n";
|
||||
|
||||
# code, msg, headers, content
|
||||
my %urls = (
|
||||
'/needs-auth.txt' => {
|
||||
auth_method => 'Basic',
|
||||
user => 'fiddle-dee-dee',
|
||||
passwd => 'Dodgson',
|
||||
code => "200",
|
||||
msg => "You want fries with that?",
|
||||
headers => {
|
||||
"Content-type" => "text/plain",
|
||||
},
|
||||
content => $wholefile,
|
||||
},
|
||||
);
|
||||
|
||||
my $cmdline = $WgetTest::WGETPATH . " --user=fiddle-dee-dee --password=Dodgson"
|
||||
. " http://localhost:{{port}}/needs-auth.txt";
|
||||
|
||||
my $expected_error_code = 0;
|
||||
|
||||
my %expected_downloaded_files = (
|
||||
'needs-auth.txt' => {
|
||||
content => $wholefile,
|
||||
},
|
||||
);
|
||||
|
||||
###############################################################################
|
||||
|
||||
my $the_test = HTTPTest->new (input => \%urls,
|
||||
cmdline => $cmdline,
|
||||
errcode => $expected_error_code,
|
||||
output => \%expected_downloaded_files);
|
||||
exit $the_test->run();
|
||||
|
||||
# vim: et ts=4 sw=4
|
@ -1,48 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use HTTPTest;
|
||||
|
||||
|
||||
###############################################################################
|
||||
|
||||
my $wholefile = "You're all authenticated.\n";
|
||||
|
||||
# code, msg, headers, content
|
||||
my %urls = (
|
||||
'/needs-auth.txt' => {
|
||||
auth_no_challenge => 1,
|
||||
auth_method => 'Basic',
|
||||
user => 'fiddle-dee-dee',
|
||||
passwd => 'Dodgson',
|
||||
code => "200",
|
||||
msg => "You want fries with that?",
|
||||
headers => {
|
||||
"Content-type" => "text/plain",
|
||||
},
|
||||
content => $wholefile,
|
||||
},
|
||||
);
|
||||
|
||||
my $cmdline = $WgetTest::WGETPATH . " --auth-no-challenge "
|
||||
. "http://fiddle-dee-dee:Dodgson\@localhost:{{port}}/needs-auth.txt";
|
||||
|
||||
my $expected_error_code = 0;
|
||||
|
||||
my %expected_downloaded_files = (
|
||||
'needs-auth.txt' => {
|
||||
content => $wholefile,
|
||||
},
|
||||
);
|
||||
|
||||
###############################################################################
|
||||
|
||||
my $the_test = HTTPTest->new (input => \%urls,
|
||||
cmdline => $cmdline,
|
||||
errcode => $expected_error_code,
|
||||
output => \%expected_downloaded_files);
|
||||
exit $the_test->run();
|
||||
|
||||
# vim: et ts=4 sw=4
|
@ -1,49 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use HTTPTest;
|
||||
|
||||
|
||||
###############################################################################
|
||||
|
||||
my $wholefile = "You're all authenticated.\n";
|
||||
|
||||
# code, msg, headers, content
|
||||
my %urls = (
|
||||
'/needs-auth.txt' => {
|
||||
auth_no_challenge => 1,
|
||||
auth_method => 'Basic',
|
||||
user => 'fiddle-dee-dee',
|
||||
passwd => 'Dodgson',
|
||||
code => "200",
|
||||
msg => "You want fries with that?",
|
||||
headers => {
|
||||
"Content-type" => "text/plain",
|
||||
},
|
||||
content => $wholefile,
|
||||
},
|
||||
);
|
||||
|
||||
my $cmdline = $WgetTest::WGETPATH . " --auth-no-challenge"
|
||||
. " --user=fiddle-dee-dee --password=Dodgson"
|
||||
. " http://localhost:{{port}}/needs-auth.txt";
|
||||
|
||||
my $expected_error_code = 0;
|
||||
|
||||
my %expected_downloaded_files = (
|
||||
'needs-auth.txt' => {
|
||||
content => $wholefile,
|
||||
},
|
||||
);
|
||||
|
||||
###############################################################################
|
||||
|
||||
my $the_test = HTTPTest->new (input => \%urls,
|
||||
cmdline => $cmdline,
|
||||
errcode => $expected_error_code,
|
||||
output => \%expected_downloaded_files);
|
||||
exit $the_test->run();
|
||||
|
||||
# vim: et ts=4 sw=4
|
@ -1,37 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use HTTPTest;
|
||||
|
||||
|
||||
###############################################################################
|
||||
|
||||
# code, msg, headers, content
|
||||
my %urls = (
|
||||
'/dummy.txt' => {
|
||||
code => "403",
|
||||
msg => "Dontcare",
|
||||
headers => {
|
||||
"Content-type" => "text/plain",
|
||||
"Last-Modified" => "Sat, 09 Oct 2004 08:30:00 GMT",
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
my $cmdline = $WgetTest::WGETPATH . " -N http://localhost:{{port}}/dummy.txt";
|
||||
|
||||
my $expected_error_code = 8;
|
||||
|
||||
my %expected_downloaded_files = ();
|
||||
|
||||
###############################################################################
|
||||
|
||||
my $the_test = HTTPTest->new (input => \%urls,
|
||||
cmdline => $cmdline,
|
||||
errcode => $expected_error_code,
|
||||
output => \%expected_downloaded_files);
|
||||
exit $the_test->run();
|
||||
|
||||
# vim: et ts=4 sw=4
|
@ -1,48 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use HTTPTest;
|
||||
|
||||
|
||||
###############################################################################
|
||||
|
||||
my $wholefile = "You're all authenticated.\n";
|
||||
|
||||
# code, msg, headers, content
|
||||
my %urls = (
|
||||
'/needs-auth.txt' => {
|
||||
auth_method => 'Basic',
|
||||
user => 'fiddle-dee-dee',
|
||||
passwd => 'Dodgson',
|
||||
code => "200",
|
||||
msg => "You want fries with that?",
|
||||
headers => {
|
||||
"Content-type" => "text/plain",
|
||||
"Content-Disposition" => "attachment; filename=\"Flubber\"",
|
||||
},
|
||||
content => $wholefile,
|
||||
},
|
||||
);
|
||||
|
||||
my $cmdline = $WgetTest::WGETPATH . " --user=fiddle-dee-dee --password=Dodgson"
|
||||
. " --content-disposition http://localhost:{{port}}/needs-auth.txt";
|
||||
|
||||
my $expected_error_code = 0;
|
||||
|
||||
my %expected_downloaded_files = (
|
||||
'Flubber' => {
|
||||
content => $wholefile,
|
||||
},
|
||||
);
|
||||
|
||||
###############################################################################
|
||||
|
||||
my $the_test = HTTPTest->new (input => \%urls,
|
||||
cmdline => $cmdline,
|
||||
errcode => $expected_error_code,
|
||||
output => \%expected_downloaded_files);
|
||||
exit $the_test->run();
|
||||
|
||||
# vim: et ts=4 sw=4
|
@ -1,92 +0,0 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use HTTPTest;
|
||||
|
||||
|
||||
###############################################################################
|
||||
my $osname = $^O;
|
||||
print "OS=$osname\n";
|
||||
|
||||
my $index = <<EOF;
|
||||
<html>
|
||||
<head>
|
||||
<title>Index</title>
|
||||
</head>
|
||||
<body>
|
||||
<a href="site;sub:.html">Site</a>
|
||||
</body>
|
||||
</html>
|
||||
EOF
|
||||
|
||||
my $converted = <<EOF;
|
||||
<html>
|
||||
<head>
|
||||
<title>Index</title>
|
||||
</head>
|
||||
<body>
|
||||
<a href="./site%3Bsub:.html">Site</a>
|
||||
</body>
|
||||
</html>
|
||||
EOF
|
||||
|
||||
my $site = <<EOF;
|
||||
<html>
|
||||
<head>
|
||||
<title>Site</title>
|
||||
</head>
|
||||
<body>
|
||||
Subsite
|
||||
</body>
|
||||
</html>
|
||||
EOF
|
||||
|
||||
# code, msg, headers, content
|
||||
my %urls = (
|
||||
'/index.html' => {
|
||||
code => "200",
|
||||
msg => "Ok",
|
||||
headers => {
|
||||
"Content-type" => "text/html",
|
||||
},
|
||||
content => $index,
|
||||
},
|
||||
'/site;sub:.html' => {
|
||||
code => "200",
|
||||
msg => "Ok",
|
||||
headers => {
|
||||
"Content-type" => "text/html",
|
||||
},
|
||||
content => $site,
|
||||
},
|
||||
);
|
||||
|
||||
my $restrict = "unix";
|
||||
if ($osname eq "MSWin32") {
|
||||
$restrict = "windows";
|
||||
}
|
||||
|
||||
my $cmdline = $WgetTest::WGETPATH . " -k -r -nH --restrict-file-names=$restrict http://localhost:{{port}}/index.html";
|
||||
|
||||
my $expected_error_code = 0;
|
||||
|
||||
my %expected_downloaded_files = (
|
||||
'index.html' => {
|
||||
content => $converted,
|
||||
},
|
||||
'site;sub:.html' => {
|
||||
content => $site,
|
||||
},
|
||||
);
|
||||
|
||||
###############################################################################
|
||||
|
||||
my $the_test = HTTPTest->new (input => \%urls,
|
||||
cmdline => $cmdline,
|
||||
errcode => $expected_error_code,
|
||||
output => \%expected_downloaded_files);
|
||||
exit $the_test->run();
|
||||
|
||||
# vim: et ts=4 sw=4
|
Loading…
Reference in New Issue
Block a user