X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=tests%2FTest--spider-r.px;h=b84bafba861637077614590e90fc71d1e73ef16e;hp=94ca2c7a905a46e39385a46ee666c48e5231740b;hb=320cfdcb658e8d6556ae9dfd902c2db1db866a6b;hpb=f0b4f352bfedd1ac5b639db801445261f19a73ff diff --git a/tests/Test--spider-r.px b/tests/Test--spider-r.px index 94ca2c7a..b84bafba 100755 --- a/tests/Test--spider-r.px +++ b/tests/Test--spider-r.px @@ -1,6 +1,7 @@ -#!/usr/bin/perl -w +#!/usr/bin/env perl use strict; +use warnings; use HTTPTest; @@ -14,8 +15,8 @@ my $mainpage = <

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

@@ -28,8 +29,8 @@ my $secondpage = <

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

@@ -42,8 +43,8 @@ my $thirdpage = <

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

@@ -89,9 +90,9 @@ my %urls = ( }, ); -my $cmdline = "wget --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 = ( ); @@ -99,11 +100,11 @@ my %expected_downloaded_files = ( ############################################################################### my $the_test = HTTPTest->new (name => "Test--spider-r", - input => \%urls, - cmdline => $cmdline, - errcode => $expected_error_code, + input => \%urls, + cmdline => $cmdline, + errcode => $expected_error_code, output => \%expected_downloaded_files); -$the_test->run(); +exit $the_test->run(); # vim: et ts=4 sw=4