]> sjero.net Git - wget/blobdiff - tests/WgetTest.pm.in
Tests: exclude existing files from the check of unexpected downloads.
[wget] / tests / WgetTest.pm.in
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";
     }