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