8 ###############################################################################
13 <title>Main Page</title>
17 Some text and a link to a <a href="http://localhost:8080/firstlevel/secondpage.html">second page</a>.
23 my $secondpage = <<EOF;
26 <title>Second Page</title>
30 Some text and a link to a <a href="http://localhost:8080/firstlevel/lowerlevel/thirdpage.html">third page</a>.
36 my $thirdpage = <<EOF;
39 <title>Third Page</title>
43 Some text and a link to a <a href="http://localhost:8080/higherlevelpage.html">higher level page</a>.
49 my $fourthpage = <<EOF;
52 <title>Fourth Page</title>
56 This page is only linked by the higher level page. Therefore, it should not
63 my $higherlevelpage = <<EOF;
66 <title>Higher Level Page</title>
70 This page is on a higher level in the URL path hierarchy. Therefore, it
71 should not be downloaded. Wget should not visit the following link to a
72 <a href="http://localhost:8080/firstlevel/fourthpage.html">fourth page</a>.
78 # code, msg, headers, content
80 '/firstlevel/index.html' => {
84 "Content-type" => "text/html",
88 '/firstlevel/secondpage.html' => {
92 "Content-type" => "text/html",
94 content => $secondpage,
96 '/firstlevel/lowerlevel/thirdpage.html' => {
100 "Content-type" => "text/html",
102 content => $thirdpage,
104 '/firstlevel/fourthpage.html' => {
108 "Content-type" => "text/plain",
110 content => $fourthpage,
112 '/higherlevelpage.html' => {
116 "Content-type" => "text/plain",
118 content => $higherlevelpage,
122 my $cmdline = $WgetTest::WGETPATH . " -np -nH -r http://localhost:8080/firstlevel/";
124 my $expected_error_code = 0;
126 my %expected_downloaded_files = (
127 'firstlevel/index.html' => {
128 content => $mainpage,
130 'firstlevel/secondpage.html' => {
131 content => $secondpage,
133 'firstlevel/lowerlevel/thirdpage.html' => {
134 content => $thirdpage,
138 ###############################################################################
140 my $the_test = HTTPTest->new (name => "Test-np",
143 errcode => $expected_error_code,
144 output => \%expected_downloaded_files);
145 exit $the_test->run();