From 72687f78cbb9f9d6039ed0c06831e3a3444116b4 Mon Sep 17 00:00:00 2001 From: Micah Cowan Date: Fri, 22 Aug 2008 16:56:18 -0700 Subject: [PATCH] Test for -O, -nc. --- tests/Test-O-nc.px | 46 ++++++++++++++++++++++++++++++++++++++++++++++ tests/run-px | 1 + 2 files changed, 47 insertions(+) create mode 100755 tests/Test-O-nc.px diff --git a/tests/Test-O-nc.px b/tests/Test-O-nc.px new file mode 100755 index 00000000..08819e4b --- /dev/null +++ b/tests/Test-O-nc.px @@ -0,0 +1,46 @@ +#!/usr/bin/perl -w + +use strict; + +use HTTPTest; + + +############################################################################### + +my $dummyfile = < { + code => "200", + msg => "Dontcare", + headers => { + "Content-type" => "text/plain", + }, + content => $dummyfile + }, +); + +my $cmdline = $WgetTest::WGETPATH . " -nc -O out http://localhost:{{port}}/dummy.txt"; + +my $expected_error_code = 0; + +my %expected_downloaded_files = ( + 'out' => { + content => $dummyfile, + } +); + +############################################################################### + +my $the_test = HTTPTest->new (name => "Test-O-nc", + 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 37f14324..f6c8cf6e 100755 --- a/tests/run-px +++ b/tests/run-px @@ -36,6 +36,7 @@ my @tests = ( 'Test-O--no-content-disposition-trivial.px', 'Test-O-nonexisting.px', 'Test-O.px', + 'Test-O-nc.px', 'Test-Restrict-Lowercase.px', 'Test-Restrict-Uppercase.px', 'Test--spider-fail.px', -- 2.39.2