зеркало из https://github.com/mozilla/gecko-dev.git
We don't really need to look for fragments that are pulled in by [% INCLUDE %] or [% PROCESS %]. While removing this code bit doesn't allow us to seperatly check that those fragments exist and compile, they'll be checked atomatically when the the template that wants them is run through the process() routine by the 004template.t test. This issue was raised because bug 98707 introduced a [% BLOCK %] element and the syntax for using that is the same as for including a template fragment.
This commit is contained in:
Родитель
7715f0fe9d
Коммит
cca68c9a93
|
@ -43,19 +43,4 @@ foreach my $file (@files) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# Now let's look at the templates and find any other templates
|
|
||||||
# that are INCLUDEd.
|
|
||||||
foreach my $file(@testitems) {
|
|
||||||
open (FILE, $include_path . "/" . $file) || next;
|
|
||||||
my @lines = <FILE>;
|
|
||||||
close (FILE);
|
|
||||||
foreach my $line (@lines) {
|
|
||||||
if ($line =~ m/\[% (?:INCLUDE|PROCESS) (.+?) /) {
|
|
||||||
my $template = $1;
|
|
||||||
push (@testitems, $template) unless $t{$template};
|
|
||||||
$t{$template} = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче