Debian Codegraph @

tests/Test-nonexisting-quiet.px

raw
1 #!/usr/bin/env 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/plain",
22 },
23 content => $dummyfile
24 },
25 );
26
27 my $cmdline = $WgetTest::WGETPATH . " --quiet http://localhost:{{port}}/nonexistent";
28
29 my $expected_error_code = 8;
30
31 my %expected_downloaded_files = (
32 );
33
34 ###############################################################################
35
36 my $the_test = HTTPTest->new (input => \%urls,
37 cmdline => $cmdline,
38 errcode => $expected_error_code,
39 output => \%expected_downloaded_files);
40 exit $the_test->run();
41
42 # vim: et ts=4 sw=4