]> sjero.net Git - wget/blobdiff - tests/Test-N-current.px
Catch failures in Test-N-current.px.
[wget] / tests / Test-N-current.px
index 47003c7ee2cd085ff3f3310391339aa1359c3f58..16086ae8a8e62bde6a046bec5dccef05c4bd765a 100755 (executable)
@@ -15,6 +15,11 @@ my $currentversion = <<EOF;
 55555555555555555555555555555555555555555555555555
 EOF
 
+# The server should serve a slightly different content, but with the
+# same length, so we can test which version was downloaded.
+my $modifiedversion = $currentversion;
+$modifiedversion =~ s/^(.{20}).(.*)$/$1x$2/s;
+
 # code, msg, headers, content
 my %urls = (
     '/somefile.txt' => {
@@ -24,7 +29,7 @@ my %urls = (
             "Content-type" => "text/plain",
             "Last-Modified" => "Sat, 09 Oct 2004 08:30:00 GMT",
         },
-        content => $currentversion,
+        content => $modifiedversion,
     },
 );