]> sjero.net Git - wget/blob - tests/Test-ftp-iri.px
Test FTP IRI support
[wget] / tests / Test-ftp-iri.px
1 #!/usr/bin/perl -w
2
3 use strict;
4
5 use FTPTest;
6
7
8 ###############################################################################
9
10 my $ccedilla_l1 = "\xE7";
11 my $ccedilla_u8 = "\xC3\xA7";
12
13 my $francais = <<EOF;
14 Some text.
15 EOF
16
17 $francais =~ s/\n/\r\n/;
18
19
20 # code, msg, headers, content
21 my %urls = (
22     "/fran${ccedilla_u8}ais.txt" => {
23         content => $francais,
24     },
25 );
26
27 my $cmdline = $WgetTest::WGETPATH . " --locale=iso-8859-1 -S ftp://localhost:{{port}}/fran${ccedilla_l1}ais.txt";
28
29 my $expected_error_code = 0;
30
31 my %expected_downloaded_files = (
32     "fran${ccedilla_u8}ais.txt" => {
33         content => $francais,
34     },
35 );
36
37 ###############################################################################
38
39 my $the_test = FTPTest->new (name => "Test-ftp-iri",
40                              input => \%urls, 
41                              cmdline => $cmdline, 
42                              errcode => $expected_error_code, 
43                              output => \%expected_downloaded_files);
44 exit $the_test->run();
45
46 # vim: et ts=4 sw=4
47