~ubuntu-branches/ubuntu/lucid/wget/lucid-security

« back to all changes in this revision

Viewing changes to tests/Test-ftp-iri-disabled.px

  • Committer: Bazaar Package Importer
  • Author(s): Marc Deslauriers
  • Date: 2009-12-12 08:15:59 UTC
  • mfrom: (2.1.5 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091212081559-mvccl4kzdqb138y3
Tags: 1.12-1.1ubuntu1
* Merge from debian testing, remaining changes:
  - Add wget-udeb to ship wget.gnu as alternative to busybox wget
    implementation.
* Keep build dependencies in main:
  - debian/control: remove info2man build-dep
  - debian/patches/00list: disable wget-infopod_generated_manpage.dpatch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/bin/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
 
 
22
# code, msg, headers, content
 
23
my %urls = (
 
24
    "/fran${ccedilla_u8}ais.txt" => {
 
25
        content => $francais,
 
26
    },
 
27
    "/fran${ccedilla_l1}ais.txt" => {
 
28
        content => $francais,
 
29
    },
 
30
);
 
31
 
 
32
my $cmdline = $WgetTest::WGETPATH . " --no-iri --local-encoding=iso-8859-1 -S ftp://localhost:{{port}}/fran${ccedilla_l1}ais.txt";
 
33
 
 
34
my $expected_error_code = 0;
 
35
 
 
36
my %expected_downloaded_files = (
 
37
    "fran${ccedilla_l1}ais.txt" => {
 
38
        content => $francais,
 
39
    },
 
40
);
 
41
 
 
42
###############################################################################
 
43
 
 
44
my $the_test = FTPTest->new (name => "Test-ftp-iri",
 
45
                             input => \%urls,
 
46
                             cmdline => $cmdline,
 
47
                             errcode => $expected_error_code,
 
48
                             output => \%expected_downloaded_files);
 
49
exit $the_test->run();
 
50
 
 
51
# vim: et ts=4 sw=4
 
52