wget/tests/Test-ftp.px

45 lines
890 B
Plaintext
Raw Normal View History

#!/usr/bin/env perl
2007-06-15 00:05:59 +08:00
use strict;
2008-11-13 05:54:49 +08:00
use warnings;
2007-06-15 00:05:59 +08:00
use FTPTest;
###############################################################################
my $afile = <<EOF;
Some text.
EOF
$afile =~ s/\n/\r\n/;
# code, msg, headers, content
my %urls = (
'/afile.txt' => {
content => $afile,
},
);
2008-06-12 17:18:35 +08:00
my $cmdline = $WgetTest::WGETPATH . " -S ftp://localhost:{{port}}/afile.txt";
2007-06-15 00:05:59 +08:00
my $expected_error_code = 0;
my %expected_downloaded_files = (
'afile.txt' => {
content => $afile,
},
);
###############################################################################
2014-10-02 17:26:59 +08:00
my $the_test = FTPTest->new (
2009-09-22 11:39:44 +08:00
input => \%urls,
cmdline => $cmdline,
errcode => $expected_error_code,
2007-06-15 00:05:59 +08:00
output => \%expected_downloaded_files);
exit $the_test->run();
2007-06-15 00:05:59 +08:00
# vim: et ts=4 sw=4