8 ###############################################################################
10 my $currentversion = <<EOF;
11 11111111111111111111111111111111111111111111111111
12 222222222222222222222222222222222222222222222222222222222222
13 3333333333333333333333333333333333333333333333333333333333333333333333
14 444444444444444444444444444444444444444444444444444444444444
15 55555555555555555555555555555555555555555555555555
18 # The server should serve a slightly different content, but with the
19 # same length, so we can test which version was downloaded.
20 my $modifiedversion = $currentversion;
21 $modifiedversion =~ s/^(.{20}).(.*)$/$1x$2/s;
23 # code, msg, headers, content
29 "Content-type" => "text/plain",
30 "Last-Modified" => "Sat, 09 Oct 2004 08:30:00 GMT",
32 content => $modifiedversion,
36 my $cmdline = $WgetTest::WGETPATH . " -N http://localhost:{{port}}/somefile.txt";
38 my $expected_error_code = 0;
40 my %existing_files = (
42 content => $currentversion,
43 timestamp => 1097310600, # "Sat, 09 Oct 2004 08:30:00 GMT"
47 my %expected_downloaded_files = (
49 content => $currentversion,
50 timestamp => 1097310600, # "Sat, 09 Oct 2004 08:30:00 GMT"
54 ###############################################################################
56 my $the_test = HTTPTest->new (name => "Test-N-current",
59 errcode => $expected_error_code,
60 existing => \%existing_files,
61 output => \%expected_downloaded_files);
62 exit $the_test->run();