]> sjero.net Git - wget/blob - tests/Test-c-full.px
Updated config.guess, config.sub, install.sh.
[wget] / tests / Test-c-full.px
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5
6 use HTTPTest;
7
8
9 ###############################################################################
10
11 my $wholefile = <<EOF;
12 11111111111111111111111111111111111111111111111111
13 222222222222222222222222222222222222222222222222222222222222
14 3333333333333333333333333333333333333333333333333333333333333333333333
15 444444444444444444444444444444444444444444444444444444444444
16 55555555555555555555555555555555555555555555555555
17 EOF
18
19 # code, msg, headers, content
20 my %urls = (
21     '/somefile.txt' => {
22         code => "200",
23         msg => "Dontcare",
24         headers => {
25             "Content-type" => "text/plain",
26         },
27         content => $wholefile,
28     },
29 );
30
31 my $cmdline = $WgetTest::WGETPATH . " -c http://localhost:{{port}}/somefile.txt";
32
33 my $expected_error_code = 0;
34
35 my %existing_files = (
36     'somefile.txt' => {
37         content => $wholefile,
38     },
39 );
40
41 my %expected_downloaded_files = (
42     'somefile.txt' => {
43         content => $wholefile,
44     },
45 );
46
47 ###############################################################################
48
49 my $the_test = HTTPTest->new (name => "Test-c-full",
50                               input => \%urls, 
51                               cmdline => $cmdline, 
52                               errcode => $expected_error_code, 
53                               existing => \%existing_files,
54                               output => \%expected_downloaded_files);
55 exit $the_test->run();
56
57 # vim: et ts=4 sw=4
58