| 1 |
#!/usr/bin/env perl |
| 2 |
|
| 3 |
use strict; |
| 4 |
use warnings; |
| 5 |
|
| 6 |
use HTTPTest; |
| 7 |
|
| 8 |
|
| 9 |
############################################################################### |
| 10 |
|
| 11 |
# code, msg, headers, content |
| 12 |
my %urls = ( |
| 13 |
'/somefile.txt' => { |
| 14 |
code => "200", |
| 15 |
msg => "Dontcare", |
| 16 |
headers => { |
| 17 |
"Content-type" => "text/plain", |
| 18 |
}, |
| 19 |
content => "blabla", |
| 20 |
}, |
| 21 |
); |
| 22 |
|
| 23 |
unless(-e "/dev/full") { |
| 24 |
exit 77; # skip |
| 25 |
} |
| 26 |
|
| 27 |
my $cmdline = $WgetTest::WGETPATH . " -c http://localhost:{{port}}/somefile.txt -O /dev/full"; |
| 28 |
|
| 29 |
my $expected_error_code = 3; |
| 30 |
|
| 31 |
my %existing_files = ( |
| 32 |
); |
| 33 |
|
| 34 |
my %expected_downloaded_files = ( |
| 35 |
); |
| 36 |
|
| 37 |
############################################################################### |
| 38 |
|
| 39 |
my $the_test = HTTPTest->new (input => \%urls, |
| 40 |
cmdline => $cmdline, |
| 41 |
errcode => $expected_error_code, |
| 42 |
existing => \%existing_files, |
| 43 |
output => \%expected_downloaded_files); |
| 44 |
exit $the_test->run(); |
| 45 |
|
| 46 |
# vim: et ts=4 sw=4 |