]> sjero.net Git - wget/commitdiff
Catch failures in Test-N-current.px.
authorMicah Cowan <micah@cowan.name>
Sat, 31 May 2008 19:48:23 +0000 (12:48 -0700)
committerMicah Cowan <micah@cowan.name>
Sat, 31 May 2008 19:48:23 +0000 (12:48 -0700)
tests/ChangeLog
tests/Test-N-current.px

index 2f65fd34c14dd6863468ae4c4aaede27ca9a8564..3a6b805274d81f401aa0cdbc6bb679f3eb72b08a 100644 (file)
@@ -1,3 +1,7 @@
+2008-05-31  Micah Cowan  <micah@cowan.name>
+
+       * Test-N-current.px: Ensure we catch failures.
+
 2008-05-23  Micah Cowan  <micah@cowan.name>
 
        * Test--spider.px: Make test expect 0 return code.
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,
     },
 );