From: David Lawrence Date: Tue, 28 Jun 2011 20:53:21 +0000 (-0400) Subject: Bug 666781 - t/008filter.t should not require filterexceptions.pl when one does not... X-Git-Tag: bugzilla-4.0.2~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56a4b7a526a2f7159049b3fa94b64dd2de243aec;p=thirdparty%2Fbugzilla.git Bug 666781 - t/008filter.t should not require filterexceptions.pl when one does not exist especially with extensions r/a=mkanat --- diff --git a/t/008filter.t b/t/008filter.t index 6f95943abf..b22d9d9b4c 100644 --- a/t/008filter.t +++ b/t/008filter.t @@ -61,11 +61,7 @@ foreach my $path (@Support::Templates::include_paths) { chdir $path; # relative path # We load a %safe list of acceptable exceptions. - if (!-r "filterexceptions.pl") { - ok(0, "$path has templates but no filterexceptions.pl file. --ERROR"); - next; - } - else { + if (-r "filterexceptions.pl") { do "filterexceptions.pl"; if (ON_WINDOWS) { # filterexceptions.pl uses / separated paths, while @@ -86,10 +82,12 @@ foreach my $path (@Support::Templates::include_paths) { # us to flag which members were not found, and report that as a warning, # thereby keeping the lists clean. foreach my $file (keys %safe) { - my $list = $safe{$file}; - $safe{$file} = {}; - foreach my $directive (@$list) { - $safe{$file}{$directive} = 0; + if (ref $safe{$file} eq 'ARRAY') { + my $list = $safe{$file}; + $safe{$file} = {}; + foreach my $directive (@$list) { + $safe{$file}{$directive} = 0; + } } }