]> sjero.net Git - wget/blob - tests/Test-ftp--start-pos.px
Tests: Add test cases for option --start-pos.
[wget] / tests / Test-ftp--start-pos.px
1 #!/usr/bin/env perl
2
3 use strict;
4 use warnings;
5
6 use FTPTest;
7
8
9 ###############################################################################
10
11 my $dummyfile = "1234";
12
13 # code, msg, headers, content
14 my %urls = (
15     '/dummy.txt' => {
16         content => $dummyfile
17     },
18 );
19
20 my $cmdline = $WgetTest::WGETPATH . " --start-pos=1 ftp://localhost:{{port}}/dummy.txt";
21
22 my $expected_error_code = 0;
23
24 my %expected_downloaded_files = (
25     'dummy.txt' => {
26         content => substr($dummyfile, 1),
27     }
28 );
29
30 ###############################################################################
31
32 my $the_test = FTPTest->new (name => "Test-ftp--start-pos",
33                               input => \%urls,
34                               cmdline => $cmdline,
35                               errcode => $expected_error_code,
36                               output => \%expected_downloaded_files);
37 exit $the_test->run();
38
39 # vim: et ts=4 sw=4
40
41
42