Add test to ensure correct return code on --post-file failure

Signed-off-by: Darshit Shah <darnir@gmail.com>
This commit is contained in:
Darshit Shah 2013-03-12 12:21:07 +05:30 committed by Giuseppe Scrivano
parent 50238e49b9
commit e3b3ea5120
4 changed files with 31 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2013-03-12 Darshit Shah <darnir@gmail.com>
* Makefile.am (EXTRA_DIST): Add Test--post-file.px.
* run-px (tests): Likewise.
* Test--post-file.px: New file.
2012-11-09 Tim Ruehsen <tim.ruehsen@gmx.de>
* HTTPServer.pm: added check for must-not-match request-header

View File

@ -119,6 +119,7 @@ EXTRA_DIST = FTPServer.pm FTPTest.pm HTTPServer.pm HTTPTest.pm \
Test-O--no-content-disposition-trivial.px \
Test-O-nonexisting.px \
Test-O.px \
Test--post-file.px \
Test-proxied-https-auth.px \
Test-proxy-auth-basic.px \
Test-restrict-ascii.px \

23
tests/Test--post-file.px Executable file
View File

@ -0,0 +1,23 @@
#!/usr/bin/env perl
use strict;
use warnings;
use HTTPTest;
###############################################################################
my $cmdline = $WgetTest::WGETPATH . " -d --post-file=nofile http://localhost:{{port}}/";
my $expected_error_code = 3;
###############################################################################
my $the_test = HTTPTest->new (name => "Test-missing-file",
cmdline => $cmdline,
errcode => $expected_error_code);
exit $the_test->run();
# vim: et ts=4 sw=4

View File

@ -70,6 +70,7 @@ my @tests = (
'Test-O--no-content-disposition-trivial.px',
'Test-O-nonexisting.px',
'Test-O.px',
'Test--post-file.px',
'Test-O-nc.px',
'Test-restrict-ascii.px',
'Test-Restrict-Lowercase.px',