#!/usr/bin/perl use strict; use warnings; use HTTPTest; ############################################################################### my $mainpage = < Main Page

Some text and a link to a second page. Also, a broken link.

EOF my $secondpage = < Second Page

Some text and a link to a third page. Also, a broken link.

EOF my $thirdpage = < Third Page

Some text and a link to a text file. Also, another broken link.

EOF my $dummyfile = < { code => "200", msg => "Dontcare", headers => { "Content-type" => "text/html", }, content => $mainpage, }, '/secondpage.html' => { code => "200", msg => "Dontcare", headers => { "Content-type" => "text/html", "Content-Disposition" => "attachment; filename=\"filename.html\"", }, content => $secondpage, }, '/thirdpage.html' => { code => "200", msg => "Dontcare", headers => { "Content-type" => "text/html", }, content => $thirdpage, }, '/dummy.txt' => { code => "200", msg => "Dontcare", headers => { "Content-type" => "text/plain", }, content => $dummyfile }, ); my $cmdline = $WgetTest::WGETPATH . " --spider -r http://localhost:{{port}}/"; my $expected_error_code = 0; my %expected_downloaded_files = ( ); ############################################################################### my $the_test = HTTPTest->new (name => "Test--spider-r-HTTP-Content-Disposition", input => \%urls, cmdline => $cmdline, errcode => $expected_error_code, output => \%expected_downloaded_files); exit $the_test->run(); # vim: et ts=4 sw=4