Lines 33-41
EXPECTED
Link Here
|
33 |
|
33 |
|
34 |
my $new_content = t::lib::QA::TemplateFilters::fix_filters($input); |
34 |
my $new_content = t::lib::QA::TemplateFilters::fix_filters($input); |
35 |
is( $new_content . "\n", $expected, ); |
35 |
is( $new_content . "\n", $expected, ); |
36 |
my $missing_filters = t::lib::QA::TemplateFilters::search_missing_filters($input); |
36 |
my @missing_filters = t::lib::QA::TemplateFilters::missing_filters($input); |
37 |
is_deeply( |
37 |
is_deeply( |
38 |
$missing_filters, |
38 |
\@missing_filters, |
39 |
[ |
39 |
[ |
40 |
{ |
40 |
{ |
41 |
error => "asset_must_be_raw", |
41 |
error => "asset_must_be_raw", |
Lines 79-87
EXPECTED
Link Here
|
79 |
|
79 |
|
80 |
my $new_content = t::lib::QA::TemplateFilters::fix_filters($input); |
80 |
my $new_content = t::lib::QA::TemplateFilters::fix_filters($input); |
81 |
is( $new_content . "\n", $expected, ); |
81 |
is( $new_content . "\n", $expected, ); |
82 |
my $missing_filters = t::lib::QA::TemplateFilters::search_missing_filters($input); |
82 |
my @missing_filters = t::lib::QA::TemplateFilters::missing_filters($input); |
83 |
is_deeply( |
83 |
is_deeply( |
84 |
$missing_filters, |
84 |
\@missing_filters, |
85 |
[{ |
85 |
[{ |
86 |
error => "missing_filter", |
86 |
error => "missing_filter", |
87 |
line => " [% just_a_var %]", |
87 |
line => " [% just_a_var %]", |
Lines 163-171
EXPECTED
Link Here
|
163 |
|
163 |
|
164 |
my $new_content = t::lib::QA::TemplateFilters::fix_filters($input); |
164 |
my $new_content = t::lib::QA::TemplateFilters::fix_filters($input); |
165 |
is( $new_content . "\n", $expected, ); |
165 |
is( $new_content . "\n", $expected, ); |
166 |
my $missing_filters = t::lib::QA::TemplateFilters::search_missing_filters($input); |
166 |
my @missing_filters = t::lib::QA::TemplateFilters::missing_filters($input); |
167 |
is_deeply( |
167 |
is_deeply( |
168 |
$missing_filters,[],); |
168 |
\@missing_filters,[],); |
169 |
}; |
169 |
}; |
170 |
|
170 |
|
171 |
subtest 'Preserve pre/post chomps' => sub { |
171 |
subtest 'Preserve pre/post chomps' => sub { |
Lines 228-236
EXPECTED
Link Here
|
228 |
$input = <<INPUT; |
228 |
$input = <<INPUT; |
229 |
<a href="[% wrong_filter | html %]">[% var | html %]</a> |
229 |
<a href="[% wrong_filter | html %]">[% var | html %]</a> |
230 |
INPUT |
230 |
INPUT |
231 |
my $missing_filters = t::lib::QA::TemplateFilters::search_missing_filters($input); |
231 |
my @missing_filters = t::lib::QA::TemplateFilters::missing_filters($input); |
232 |
is_deeply( |
232 |
is_deeply( |
233 |
$missing_filters, |
233 |
\@missing_filters, |
234 |
[ |
234 |
[ |
235 |
{ |
235 |
{ |
236 |
error => "wrong_html_filter", |
236 |
error => "wrong_html_filter", |
Lines 245-250
INPUT
Link Here
|
245 |
$input = <<INPUT; |
245 |
$input = <<INPUT; |
246 |
<a href="[% good_raw_filter | \$raw %]">[% var | html %]</a> |
246 |
<a href="[% good_raw_filter | \$raw %]">[% var | html %]</a> |
247 |
INPUT |
247 |
INPUT |
248 |
$missing_filters = t::lib::QA::TemplateFilters::search_missing_filters($input); |
248 |
@missing_filters = t::lib::QA::TemplateFilters::missing_filters($input); |
249 |
is_deeply( $missing_filters, [], ); |
249 |
is_deeply( \@missing_filters, [], ); |
250 |
}; |
250 |
}; |