Debian Codegraph @

tests/Test-noop.px

raw
1 #!/usr/bin/env perl
2
3 use strict;
4 use warnings;
5
6 use HTTPTest;
7
8
9 ###############################################################################
10
11 my $index = <<EOF;
12 <html>
13 <head>
14 <title>Page Title</title>
15 </head>
16 <body>
17 <h1>Page Title</h1>
18 <p>
19 Some text here.
20 </p>
21 </body>
22 </html>
23 EOF
24
25 # code, msg, headers, content
26 my %urls = (
27 '/index.html' => {
28 code => "200",
29 msg => "Dontcare",
30 headers => {
31 "Content-type" => "text/html",
32 },
33 content => $index
34 },
35 );
36
37 my $cmdline = $WgetTest::WGETPATH . " http://localhost:{{port}}/";
38
39 my $expected_error_code = 0;
40
41 my %expected_downloaded_files = (
42 'index.html' => {
43 content => $index,
44 }
45 );
46
47 ###############################################################################
48
49 my $the_test = HTTPTest->new (input => \%urls,
50 cmdline => $cmdline,
51 errcode => $expected_error_code,
52 output => \%expected_downloaded_files);
53 exit $the_test->run();
54
55 # vim: et ts=4 sw=4