]> sjero.net Git - wget/blobdiff - tests/Test-O-nonexisting.px
Improved exit status handling.
[wget] / tests / Test-O-nonexisting.px
index b341b7f16373958e7b8ca2b9488aee7ced921ce9..c8df6d726ca2b1bec47d54e9d013259c828e06f1 100755 (executable)
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 
 use HTTPTest;
 
@@ -23,9 +24,9 @@ my %urls = (
     },
 );
 
-my $cmdline = "wget --quiet -O out http://localhost:8080/nonexistent";
+my $cmdline = $WgetTest::WGETPATH . " --quiet -O out http://localhost:{{port}}/nonexistent";
 
-my $expected_error_code = 256;
+my $expected_error_code = 8;
 
 my %expected_downloaded_files = (
     'out' => {
@@ -40,7 +41,7 @@ my $the_test = HTTPTest->new (name => "Test-O-nonexisting",
                               cmdline => $cmdline, 
                               errcode => $expected_error_code, 
                               output => \%expected_downloaded_files);
-$the_test->run();
+exit $the_test->run();
 
 # vim: et ts=4 sw=4