]> sjero.net Git - wget/blob - tests/Test-O-nonexisting.px
60ef7c70b1c7c8db2b0c2146771ffa9c9b98b663
[wget] / tests / Test-O-nonexisting.px
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5
6 use HTTPTest;
7
8
9 ###############################################################################
10
11 my $dummyfile = <<EOF;
12 Don't care.
13 EOF
14
15 # code, msg, headers, content
16 my %urls = (
17     '/dummy.html' => {
18         code => "200",
19         msg => "Dontcare",
20         headers => {
21             "Content-type" => "text/html",
22         },
23         content => $dummyfile
24     },
25 );
26
27 my $cmdline = $WgetTest::WGETPATH . " --quiet -O out http://localhost:{{port}}/nonexistent";
28
29 my $expected_error_code = 256;
30
31 my %expected_downloaded_files = (
32     'out' => {
33         content => "",
34     }
35 );
36
37 ###############################################################################
38
39 my $the_test = HTTPTest->new (name => "Test-O-nonexisting",
40                               input => \%urls, 
41                               cmdline => $cmdline, 
42                               errcode => $expected_error_code, 
43                               output => \%expected_downloaded_files);
44 exit $the_test->run();
45
46 # vim: et ts=4 sw=4
47