]> sjero.net Git - wget/commitdiff
Tests: exclude existing files from the check of unexpected downloads.
authorYousong Zhou <yszhou4tech@gmail.com>
Wed, 19 Mar 2014 15:42:06 +0000 (23:42 +0800)
committerGiuseppe Scrivano <gscrivan@redhat.com>
Fri, 21 Mar 2014 10:21:10 +0000 (11:21 +0100)
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
tests/ChangeLog
tests/WgetTest.pm.in

index a7db249cb2f766a75361ac0d54c97376f5eb7cf2..d23e76e45b92a6a3ccf9e2e0f4b72c679836d3c5 100644 (file)
@@ -1,3 +1,8 @@
+2014-02-13  Yousong Zhou  <yszhou4tech@gmail.com>
+
+       * Wget.pm.in: Exclude existing files from the check of unexpected
+         downloads.
+
 2014-02-13  Yousong Zhou  <yszhou4tech@gmail.com>
 
        * FTPServer.pm: Fix the handling of TYPE command and avoid endless
index 58ad1405bef9808baa829cc9a2f15296701de728..092777eaf2aca8dbe1f385159dfa40d9d4e879f4 100644 (file)
@@ -256,7 +256,10 @@ sub _verify_download {
     # make sure no unexpected files were downloaded
     chdir ("$self->{_workdir}/$self->{_name}/output");
 
-    __dir_walk('.', sub { push @unexpected_downloads, $_[0] unless (exists $self->{_output}{$_[0]}) }, sub { shift; return @_ } );
+    __dir_walk('.',
+               sub { push @unexpected_downloads,
+                          $_[0] unless (exists $self->{_output}{$_[0]} || $self->{_existing}{$_[0]}) },
+               sub { shift; return @_ } );
     if (@unexpected_downloads) {
         return "Test failed: unexpected downloaded files [" . join(', ', @unexpected_downloads) . "]\n";
     }