From e17633e99c3eff326ace71ed6970c491aa42845c Mon Sep 17 00:00:00 2001 From: Micah Cowan Date: Sat, 31 May 2008 13:31:05 -0700 Subject: [PATCH] Test-N-no-info.px --- tests/ChangeLog | 3 +- tests/Test-N-no-info.px | 63 +++++++++++++++++++++++++++++++++++++++++ tests/run-px | 1 + 3 files changed, 66 insertions(+), 1 deletion(-) create mode 100755 tests/Test-N-no-info.px diff --git a/tests/ChangeLog b/tests/ChangeLog index 8c40d082..f076a274 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -4,7 +4,8 @@ * 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. + * Test-N-no-info.px: added. + * run-px: Added Test-N-smaller.px, Test-N-no-info.px. 2008-05-23 Micah Cowan diff --git a/tests/Test-N-no-info.px b/tests/Test-N-no-info.px new file mode 100755 index 00000000..bd83f644 --- /dev/null +++ b/tests/Test-N-no-info.px @@ -0,0 +1,63 @@ +#!/usr/bin/perl -w + +use strict; + +use HTTPTest; + + +############################################################################### + +my $currentversion = < { + code => "200", + msg => "Dontcare", + headers => { + "Content-type" => "text/plain", + }, + 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, + }, +); + +############################################################################### + +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 7cab7531..febb0de4 100755 --- a/tests/run-px +++ b/tests/run-px @@ -21,6 +21,7 @@ my @tests = ( 'Test-HTTP-Content-Disposition.px', 'Test-N-current.px', 'Test-N-smaller.px', + 'Test-N-no-info.px', 'Test-N--no-content-disposition.px', 'Test-N--no-content-disposition-trivial.px', 'Test--no-content-disposition.px', -- 2.39.2