1#!/usr/bin/perl 2 3use strict; 4use warnings; 5 6use HTTPTest; 7 8 9############################################################################### 10 11my $dummyfile = <<EOF; 12Content 13EOF 14 15# code, msg, headers, content 16my %urls = ( 17 '/dummy.txt' => { 18 code => "200", 19 msg => "Dontcare", 20 headers => { 21 "Content-type" => "text/plain", 22 "Last-Modified" => "Sat, 09 Oct 2004 08:30:00 GMT", 23 }, 24 content => $dummyfile 25 }, 26); 27 28my $cmdline = $WgetTest::WGETPATH . " -N --no-content-disposition http://localhost:{{port}}/dummy.txt"; 29 30my $expected_error_code = 0; 31 32my %expected_downloaded_files = ( 33 'dummy.txt' => { 34 content => $dummyfile, 35 timestamp => 1097310600, # "Sat, 09 Oct 2004 08:30:00 GMT" 36 } 37); 38 39############################################################################### 40 41my $the_test = HTTPTest->new (name => "Test-N--no-content-disposition-trivial", 42 input => \%urls, 43 cmdline => $cmdline, 44 errcode => $expected_error_code, 45 output => \%expected_downloaded_files); 46exit $the_test->run(); 47 48# vim: et ts=4 sw=4 49 50