]> sjero.net Git - wget/blob - tests/Test-noop.px
Automated merge.
[wget] / tests / Test-noop.px
1 #!/usr/bin/perl -w
2
3 use strict;
4
5 use HTTPTest;
6
7
8 ###############################################################################
9
10 my $index = <<EOF;
11 <html>
12 <head>
13   <title>Page Title</title>
14 </head>
15 <body>
16   <h1>Page Title</h1>
17   <p>
18     Some text here.
19   </p>
20 </body>
21 </html>
22 EOF
23
24 # code, msg, headers, content
25 my %urls = (
26     '/index.html' => {
27         code => "200",
28         msg => "Dontcare",
29         headers => {
30             "Content-type" => "text/html",
31         },
32         content => $index
33     },
34 );
35
36 my $cmdline = $WgetTest::WGETPATH . " http://localhost:{{port}}/";
37
38 my $expected_error_code = 0;
39
40 my %expected_downloaded_files = (
41     'index.html' => {
42         content => $index,
43     }
44 );
45
46 ###############################################################################
47
48 my $the_test = HTTPTest->new (name => "Test-noop",
49                               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
56