+2007-08-21 Mauro Tortonesi <mauro@ferrara.linux.it>
+
+ * WgetTest.pm.in: Added support for timestamping of pre-existing
+ files.
+
+ * Test-N-current.px: Fixed broken test logic.
+
+ * Makefile.in: Updated list of automatically run tests.
+
+ * Test-HTTP-Content-Disposition.px: Added -e contentdisposition=on
+ option, since now HTTP Content-Disposition header support is turned
+ off by default.
+
+ * Test-HTTP-Content-Disposition-1.px: Ditto.
+
2007-07-25 Micah Cowan <micah@cowan.name>
* HTTPServer.pm (run, send_response): Farmed out some logic from
./unit-tests$(exeext)
run-px-tests: WgetTest.pm
+ ./Test-auth-basic.px && echo && echo
./Test-c-full.px && echo && echo
./Test-c-partial.px && echo && echo
./Test-c.px && echo && echo
-# ./Test-E-k-K.px && echo && echo
-# ./Test-E-k.px && echo && echo
+ ./Test-E-k-K.px && echo && echo
+ ./Test-E-k.px && echo && echo
./Test-ftp.px && echo && echo
-# ./Test-HTTP-Content-Disposition.px && echo && echo
-# ./Test-HTTP-Content-Disposition-1.px && echo && echo
-# ./Test-HTTP-Content-Disposition-2.px && echo && echo
+ ./Test-HTTP-Content-Disposition-1.px && echo && echo
+ ./Test-HTTP-Content-Disposition-2.px && echo && echo
+ ./Test-HTTP-Content-Disposition.px && echo && echo
./Test-N-current.px && echo && echo
-# ./Test-nonexisting-quiet.px && echo && echo
-# ./Test-noop.px && echo && echo
-# ./Test-np.px && echo && echo
-# ./Test-N.px && echo && echo
+ ./Test-N-old.px && echo && echo
+ ./Test-nonexisting-quiet.px && echo && echo
+ ./Test-noop.px && echo && echo
+ ./Test-np.px && echo && echo
+ ./Test-N.px && echo && echo
./Test-O-nonexisting.px && echo && echo
./Test-O.px && echo && echo
-# ./Test-Restrict-Lowercase.px && echo && echo
-# ./Test-Restrict-Uppercase.px && echo && echo
+ ./Test-Restrict-Lowercase.px && echo && echo
+ ./Test-Restrict-Uppercase.px && echo && echo
./Test--spider-fail.px && echo && echo
./Test--spider.px && echo && echo
./Test--spider-r.px && echo && echo
- ./Test-auth-basic.px && echo && echo
WgetTest.pm: WgetTest.pm.in @top_srcdir@/config.status
cd @top_srcdir@ && ./config.status
},
);
-my $cmdline = $WgetTest::WGETPATH . " http://localhost:8080/dummy.html";
+my $cmdline = $WgetTest::WGETPATH . " -e contentdisposition=on http://localhost:8080/dummy.html";
my $expected_error_code = 0;
},
);
-my $cmdline = $WgetTest::WGETPATH . " http://localhost:8080/dummy.html";
+my $cmdline = $WgetTest::WGETPATH . " -e contentdisposition=on http://localhost:8080/dummy.html";
my $expected_error_code = 0;
###############################################################################
-my $wholefile = <<EOF;
+my $currentversion = <<EOF;
11111111111111111111111111111111111111111111111111
222222222222222222222222222222222222222222222222222222222222
3333333333333333333333333333333333333333333333333333333333333333333333
msg => "Dontcare",
headers => {
"Content-type" => "text/plain",
+ "Last-Modified" => "Sat, 09 Oct 2004 08:30:00 GMT",
},
- content => $wholefile,
+ content => $currentversion,
},
);
-my $cmdline = $WgetTest::WGETPATH . " -c http://localhost:8080/somefile.txt";
+my $cmdline = $WgetTest::WGETPATH . " -N http://localhost:8080/somefile.txt";
my $expected_error_code = 0;
my %existing_files = (
'somefile.txt' => {
- content => $wholefile,
+ content => $currentversion,
+ timestamp => 1097310600, # "Sat, 09 Oct 2004 08:30:00 GMT"
},
);
my %expected_downloaded_files = (
'somefile.txt' => {
- content => $wholefile,
+ content => $currentversion,
+ timestamp => 1097310600, # "Sat, 09 Oct 2004 08:30:00 GMT"
},
);
foreach my $filename (keys %{$self->{_existing}}) {
open (FILE, ">$filename")
or return "Test failed: cannot open pre-existing file $filename\n";
-
- print FILE $self->{_existing}->{$filename}->{content}
+
+ my $file = $self->{_existing}->{$filename};
+ print FILE $file->{content}
or return "Test failed: cannot write pre-existing file $filename\n";
-
+
close (FILE);
+
+ if (exists($file->{timestamp})) {
+ utime $file->{timestamp}, $file->{timestamp}, $filename
+ or return "Test failed: cannot set timestamp on pre-existing file $filename\n";
+ }
}
chdir ("../input");