mirror of
https://github.com/moparisthebest/wget
synced 2024-07-03 16:38:41 -04:00
FTP recursion test, when IRI is on.
This commit is contained in:
parent
32aba4561f
commit
901343828b
@ -1,7 +1,11 @@
|
||||
2009-06-29 Micah Cowan <micah@cowan.name>
|
||||
|
||||
* run-px, Test-iri-percent.px: Added test for percent-coded value
|
||||
preservation.
|
||||
* WgetTest.pm.in (_cleanup): Allow cleanup of test directories to
|
||||
be skipped at user discretion.
|
||||
|
||||
* run-px, Test-iri-percent.px, Test-ftp-iri-recursive.px: Added
|
||||
test for percent-coded value preservation, FTP recursion when IRI
|
||||
support's on.
|
||||
|
||||
2008-12-04 Micah Cowan <micah@cowan.name> (not copyrightable)
|
||||
|
||||
|
47
tests/Test-ftp-iri-recursive.px
Executable file
47
tests/Test-ftp-iri-recursive.px
Executable file
@ -0,0 +1,47 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use FTPTest;
|
||||
|
||||
|
||||
###############################################################################
|
||||
|
||||
my $ccedilla_l1 = "\xE7";
|
||||
my $ccedilla_u8 = "\xC3\xA7";
|
||||
|
||||
my $francais = <<EOF;
|
||||
Some text.
|
||||
EOF
|
||||
|
||||
$francais =~ s/\n/\r\n/;
|
||||
|
||||
# code, msg, headers, content
|
||||
my %urls = (
|
||||
"/fran${ccedilla_l1}ais.txt" => {
|
||||
content => $francais,
|
||||
},
|
||||
);
|
||||
|
||||
my $cmdline = $WgetTest::WGETPATH . " --locale=iso-8859-1 -r -nH -S ftp://localhost:{{port}}/";
|
||||
|
||||
my $expected_error_code = 0;
|
||||
|
||||
my %expected_downloaded_files = (
|
||||
"fran${ccedilla_l1}ais.txt" => {
|
||||
content => $francais,
|
||||
},
|
||||
);
|
||||
|
||||
###############################################################################
|
||||
|
||||
my $the_test = FTPTest->new (name => "Test-ftp-iri-recursive",
|
||||
input => \%urls,
|
||||
cmdline => $cmdline,
|
||||
errcode => $expected_error_code,
|
||||
output => \%expected_downloaded_files);
|
||||
exit $the_test->run();
|
||||
|
||||
# vim: et ts=4 sw=4
|
||||
|
@ -153,7 +153,7 @@ sub _cleanup {
|
||||
my $self = shift;
|
||||
|
||||
chdir ($self->{_workdir});
|
||||
File::Path::rmtree ($self->{_name});
|
||||
File::Path::rmtree ($self->{_name}) unless $ENV{WGET_TEST_NO_CLEANUP};
|
||||
}
|
||||
|
||||
|
||||
|
@ -27,6 +27,7 @@ my @tests = (
|
||||
'Test-ftp.px',
|
||||
'Test-ftp-iri.px',
|
||||
'Test-ftp-iri-fallback.px',
|
||||
'Test-ftp-iri-recursive.px',
|
||||
'Test-ftp-iri-disabled.px',
|
||||
'Test-HTTP-Content-Disposition-1.px',
|
||||
'Test-HTTP-Content-Disposition-2.px',
|
||||
|
Loading…
Reference in New Issue
Block a user