]> sjero.net Git - wget/blob - tests/Test1.px
[svn] New OO Architecture for Wget Test Suite
[wget] / tests / Test1.px
1 #!/usr/bin/perl -w
2
3 use strict;
4
5 use HTTPTest;
6
7
8 ###############################################################################
9
10 my $dummyfile = <<EOF;
11 Content
12 EOF
13
14 # code, msg, headers, content
15 my %urls = (
16     '/dummy.html' => {
17         code => "200",
18         msg => "Dontcare",
19         headers => {
20             "Content-type" => "text/plain",
21         },
22         content => $dummyfile
23     },
24 );
25
26 my $cmdline = "../src/wget -vd http://localhost:8080/dummy.html";
27
28 my $expected_error_code = 0;
29
30 my %expected_downloaded_files = (
31     'dummy.html' => {
32         content => $dummyfile,
33     }
34 );
35
36 ###############################################################################
37
38 my $the_test = HTTPTest->new (urls => \%urls, 
39                               cmdline => $cmdline, 
40                               errcode => $expected_error_code, 
41                               downloads => \%expected_downloaded_files);
42 $the_test->run();
43
44 # vim: et ts=4 sw=4
45