From: Giuseppe Scrivano Date: Sat, 29 May 2010 21:10:59 +0000 (+0200) Subject: Add new test. X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=05fccaeed255e4976314c33a5a94f9438d53f666 Add new test. --- diff --git a/tests/ChangeLog b/tests/ChangeLog index 84e62c96..d9d4d909 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,11 @@ +2010-05-29 Giuseppe Scrivano + + * Makefile.am (EXTRA_DIST): Add Test-auth-retcode.px. + + * run-px (tests): Likewise. + + * Test-auth-retcode.px: New file. + 2010-05-16 Giuseppe Scrivano * Makefile.am (../md5/libmd5.a): Remove rule. diff --git a/tests/Makefile.am b/tests/Makefile.am index e2deb980..8dafe073 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -65,6 +65,7 @@ EXTRA_DIST = FTPServer.pm FTPTest.pm HTTPServer.pm HTTPTest.pm \ Test-auth-no-challenge.px \ Test-auth-no-challenge-url.px \ Test-auth-with-content-disposition.px \ + Test-auth-retcode.px \ Test-c-full.px \ Test-c-partial.px \ Test-c.px \ diff --git a/tests/Test-auth-retcode.px b/tests/Test-auth-retcode.px new file mode 100644 index 00000000..5e16fa6d --- /dev/null +++ b/tests/Test-auth-retcode.px @@ -0,0 +1,38 @@ +#!/usr/bin/perl + +use strict; +use warnings; + +use HTTPTest; + + +############################################################################### + +# code, msg, headers, content +my %urls = ( + '/dummy.txt' => { + code => "403", + msg => "Dontcare", + headers => { + "Content-type" => "text/plain", + "Last-Modified" => "Sat, 09 Oct 2004 08:30:00 GMT", + }, + }, +); + +my $cmdline = $WgetTest::WGETPATH . " -N http://localhost:{{port}}/dummy.txt"; + +my $expected_error_code = 8; + +my %expected_downloaded_files = (); + +############################################################################### + +my $the_test = HTTPTest->new (name => "Test-auth-retcode", + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, + 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 64dca1a2..cce44e45 100755 --- a/tests/run-px +++ b/tests/run-px @@ -14,6 +14,7 @@ my @tests = ( 'Test-auth-no-challenge.px', 'Test-auth-no-challenge-url.px', 'Test-auth-with-content-disposition.px', + 'Test-auth-retcode.px', 'Test-cookies.px', 'Test-cookies-401.px', 'Test-proxy-auth-basic.px',