From: Yousong Zhou Date: Wed, 19 Mar 2014 15:42:06 +0000 (+0800) Subject: Tests: exclude existing files from the check of unexpected downloads. X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=ed54c64ad20847b79bbbedc9bd53309464cde361 Tests: exclude existing files from the check of unexpected downloads. Signed-off-by: Yousong Zhou --- diff --git a/tests/ChangeLog b/tests/ChangeLog index a7db249c..d23e76e4 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,8 @@ +2014-02-13 Yousong Zhou + + * Wget.pm.in: Exclude existing files from the check of unexpected + downloads. + 2014-02-13 Yousong Zhou * FTPServer.pm: Fix the handling of TYPE command and avoid endless diff --git a/tests/WgetTest.pm.in b/tests/WgetTest.pm.in index 58ad1405..092777ea 100644 --- a/tests/WgetTest.pm.in +++ b/tests/WgetTest.pm.in @@ -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"; }