-#!/usr/bin/perl -w
+#!/usr/bin/env perl
use strict;
+use warnings;
use HTTPTest;
</head>
<body>
<p>
- Some text and a link to a <a href="http://localhost:8080/secondpage.html">second page</a>.
- Also, a <a href="http://localhost:8080/nonexistent">broken link</a>.
+ Some text and a link to a <a href="http://localhost:{{port}}/secondpage.html">second page</a>.
+ Also, a <a href="http://localhost:{{port}}/nonexistent">broken link</a>.
</p>
</body>
</html>
</head>
<body>
<p>
- Some text and a link to a <a href="http://localhost:8080/thirdpage.html">third page</a>.
- Also, a <a href="http://localhost:8080/nonexistent">broken link</a>.
+ Some text and a link to a <a href="http://localhost:{{port}}/thirdpage.html">third page</a>.
+ Also, a <a href="http://localhost:{{port}}/nonexistent">broken link</a>.
</p>
</body>
</html>
</head>
<body>
<p>
- Some text and a link to a <a href="http://localhost:8080/dummy.txt">text file</a>.
- Also, another <a href="http://localhost:8080/againnonexistent">broken link</a>.
+ Some text and a link to a <a href="http://localhost:{{port}}/dummy.txt">text file</a>.
+ Also, another <a href="http://localhost:{{port}}/againnonexistent">broken link</a>.
</p>
</body>
</html>
},
);
-my $cmdline = $WgetTest::WGETPATH . " --spider -r http://localhost:8080/";
+my $cmdline = $WgetTest::WGETPATH . " --spider -r http://localhost:{{port}}/";
-my $expected_error_code = 0;
+my $expected_error_code = 8;
my %expected_downloaded_files = (
);
###############################################################################
my $the_test = HTTPTest->new (name => "Test--spider-r-HTTP-Content-Disposition",
- input => \%urls,
- cmdline => $cmdline,
- errcode => $expected_error_code,
+ input => \%urls,
+ cmdline => $cmdline,
+ errcode => $expected_error_code,
output => \%expected_downloaded_files);
exit $the_test->run();