X-Git-Url: http://sjero.net/git/?a=blobdiff_plain;f=tests%2FTest-ftp-recursive.px;fp=tests%2FTest-ftp-recursive.px;h=5a86a16656e54e1a1a285ac12a49c63f6bebcf91;hb=ad4b678d2d8aac8644810319cb439994c1470a18;hp=0000000000000000000000000000000000000000;hpb=1fe5ddb7feb233de8b312c24a2b3a482316026aa;p=wget diff --git a/tests/Test-ftp-recursive.px b/tests/Test-ftp-recursive.px new file mode 100755 index 00000000..5a86a166 --- /dev/null +++ b/tests/Test-ftp-recursive.px @@ -0,0 +1,55 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use FTPTest; + + +############################################################################### + +my $afile = < { + content => $afile, + }, + '/bar/baz/bfile.txt' => { + content => $bfile, + }, +); + +my $cmdline = $WgetTest::WGETPATH . " -S -nH -r ftp://localhost:{{port}}/"; + +my $expected_error_code = 0; + +my %expected_downloaded_files = ( + 'foo/afile.txt' => { + content => $afile, + }, + 'bar/baz/bfile.txt' => { + content => $bfile, + }, +); + +############################################################################### + +my $the_test = FTPTest->new (name => "Test-ftp-recursive", + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, + output => \%expected_downloaded_files); +exit $the_test->run(); + +# vim: et ts=4 sw=4 +