From: Micah Cowan Date: Sat, 31 May 2008 20:22:15 +0000 (-0700) Subject: Test-N-smaller.px. X-Git-Tag: v1.13~421^2~12^2~7^2~3 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=f6acc704426d67c8a5ae3715ce48b203fb7f756c Test-N-smaller.px. --- diff --git a/tests/ChangeLog b/tests/ChangeLog index 6d381b4e..8c40d082 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -3,6 +3,8 @@ * Test-N-current.px: Ensure we catch failures. * Test-N-old.px: Make it test only the timestamp, and not the content length in addition. + * Test-N-smaller.px: added. + * run-px: Added Test-N-smaller.px. 2008-05-23 Micah Cowan diff --git a/tests/Test-N-smaller.px b/tests/Test-N-smaller.px new file mode 100755 index 00000000..9ad44c29 --- /dev/null +++ b/tests/Test-N-smaller.px @@ -0,0 +1,66 @@ +#!/usr/bin/perl -w + +use strict; + +use HTTPTest; + + +############################################################################### + +my $currentversion = < { + code => "200", + msg => "Dontcare", + headers => { + "Content-type" => "text/plain", + "Content-Length" => length $newversion, + "Last-Modified" => "Sat, 09 Oct 2004 08:30:00 GMT", + }, + content => $newversion, + }, +); + +my $cmdline = $WgetTest::WGETPATH . " -N http://localhost:8080/somefile.txt"; + +my $expected_error_code = 0; + +my %existing_files = ( + 'somefile.txt' => { + content => $currentversion, + timestamp => 1097310600, # "Sat, 09 Oct 2004 08:30:00 GMT" + }, +); + +my %expected_downloaded_files = ( + 'somefile.txt' => { + content => $newversion, + timestamp => 1097310600, # "Sat, 09 Oct 2004 08:30:00 GMT" + }, +); + +############################################################################### + +my $the_test = HTTPTest->new (name => "Test-N-current", + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, + existing => \%existing_files, + output => \%expected_downloaded_files); +exit $the_test->run(); + +# vim: et ts=4 sw=4 + diff --git a/tests/run-px b/tests/run-px index fd1c40ac..7cab7531 100755 --- a/tests/run-px +++ b/tests/run-px @@ -10,7 +10,6 @@ my @tests = ( 'Test-proxied-https-auth.px', 'Test-N-HTTP-Content-Disposition.px', 'Test--spider.px', - 'Test-c-full.px', 'Test-c-partial.px', 'Test-c.px', @@ -21,6 +20,7 @@ my @tests = ( 'Test-HTTP-Content-Disposition-2.px', 'Test-HTTP-Content-Disposition.px', 'Test-N-current.px', + 'Test-N-smaller.px', 'Test-N--no-content-disposition.px', 'Test-N--no-content-disposition-trivial.px', 'Test--no-content-disposition.px',