aboutsummaryrefslogtreecommitdiffstats
path: root/t/Support
diff options
context:
space:
mode:
authorDavid Lawrence <dlawrence@mozilla.com>2011-06-23 14:43:18 -0400
committerDavid Lawrence <dlawrence@mozilla.com>2011-06-23 14:43:18 -0400
commitc246445ab9801f28f99d6c88395bd3238b11f6bd (patch)
treefe3d2477699b94ec157be2f0f580f0401c450a98 /t/Support
parent1b2a97410df9b794a820d88ce5e4723688e3499a (diff)
downloadbugs-c246445ab9801f28f99d6c88395bd3238b11f6bd.tar
bugs-c246445ab9801f28f99d6c88395bd3238b11f6bd.tar.gz
bugs-c246445ab9801f28f99d6c88395bd3238b11f6bd.tar.bz2
bugs-c246445ab9801f28f99d6c88395bd3238b11f6bd.tar.xz
bugs-c246445ab9801f28f99d6c88395bd3238b11f6bd.zip
Bug 663835 - Extensions templates are not tested by the normal sanity test scripts
r/a=mkanat
Diffstat (limited to 't/Support')
-rw-r--r--t/Support/Templates.pm29
1 files changed, 5 insertions, 24 deletions
diff --git a/t/Support/Templates.pm b/t/Support/Templates.pm
index 40e16f105..90b63a726 100644
--- a/t/Support/Templates.pm
+++ b/t/Support/Templates.pm
@@ -34,6 +34,8 @@ use base qw(Exporter);
use vars qw(@languages @include_paths %include_path @referenced_files
%actual_files $num_actual_files);
+use Bugzilla;
+use Bugzilla::Install::Util qw(template_include_path);
use Support::Files;
use File::Find;
@@ -57,30 +59,9 @@ use File::Spec;
# total number of actual_files
$num_actual_files = 0;
-# Scan for the template available languages and include paths
-{
- opendir(DIR, "template") || die "Can't open 'template': $!";
- my @files = grep { /^[a-z-]+$/i } readdir(DIR);
- closedir DIR;
-
- foreach my $langdir (@files) {
- next if($langdir =~ /^CVS$/i);
-
- my $path = File::Spec->catdir('template', $langdir, 'custom');
- my @dirs = ();
- push(@dirs, $path) if(-d $path);
- $path = File::Spec->catdir('template', $langdir, 'extension');
- push(@dirs, $path) if(-d $path);
- $path = File::Spec->catdir('template', $langdir, 'default');
- push(@dirs, $path) if(-d $path);
-
- next if(scalar(@dirs) == 0);
- push(@languages, $langdir);
- push(@include_paths, @dirs);
- $include_path{$langdir} = join(":",@dirs);
- }
-}
-
+# Set the template available languages and include paths
+@languages = @{ Bugzilla->languages };
+@include_paths = @{ template_include_path({ language => Bugzilla->languages }) };
my @files;