summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Lawrence <dlawrence@mozilla.com>2011-06-28 22:46:35 +0200
committerDavid Lawrence <dlawrence@mozilla.com>2011-06-28 22:46:35 +0200
commitd6661a06f7a23885746d34df5452b22df5d95c6f (patch)
treeb078762e57e379b3702a3bef4a619a1653130244
parentcf489fc6fbec4cb2228e3dbc5af9ef98667a93d0 (diff)
downloadbugzilla-d6661a06f7a23885746d34df5452b22df5d95c6f.tar.gz
bugzilla-d6661a06f7a23885746d34df5452b22df5d95c6f.tar.xz
Bug 666781 - t/008filter.t should not require filterexceptions.pl when one does not exist especially with extensions
r/a=mkanat
-rw-r--r--t/008filter.t16
1 files changed, 7 insertions, 9 deletions
diff --git a/t/008filter.t b/t/008filter.t
index a2f96ae3e..e73d23835 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;
+ }
}
}