]> sjero.net Git - wget/blob - tests/Test-O--no-content-disposition-trivial.px
Catch failures in Test-N-current.px.
[wget] / tests / Test-O--no-content-disposition-trivial.px
1 #!/usr/bin/perl -w
2
3 use strict;
4
5 use HTTPTest;
6
7
8 ###############################################################################
9
10 my $dummyfile = <<EOF;
11 Don't care.
12 EOF
13
14 # code, msg, headers, content
15 my %urls = (
16     '/dummy.txt' => {
17         code => "200",
18         msg => "Dontcare",
19         headers => {
20             "Content-type" => "text/plain",
21         },
22         content => $dummyfile
23     },
24 );
25
26 my $cmdline = $WgetTest::WGETPATH . " -O out --no-content-disposition http://localhost:8080/dummy.txt";
27
28 my $expected_error_code = 0;
29
30 my %expected_downloaded_files = (
31     'out' => {
32         content => $dummyfile,
33     }
34 );
35
36 ###############################################################################
37
38 my $the_test = HTTPTest->new (name => "Test-O--no-content-disposition-trivial",
39                               input => \%urls, 
40                               cmdline => $cmdline, 
41                               errcode => $expected_error_code, 
42                               output => \%expected_downloaded_files);
43 exit $the_test->run();
44
45 # vim: et ts=4 sw=4
46