diff options
author | Jesse Luehrs <doy@tozt.net> | 2012-10-19 10:42:20 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2012-10-19 10:42:20 -0500 |
commit | 47fc628b0553c6b1bf7597f29bd2b6b5ce238cbf (patch) | |
tree | 19bcbc1529a8994f8c3f70871bbba48861fe57f1 /t/mustache-spec.t | |
parent | 71a5add2e54c2cddf61db1af59c0653c2b763290 (diff) | |
download | text-handlebars-47fc628b0553c6b1bf7597f29bd2b6b5ce238cbf.tar.gz text-handlebars-47fc628b0553c6b1bf7597f29bd2b6b5ce238cbf.zip |
simplify the logic for template suffixes
now, anything that doesn't contain a '.' will have the suffix appended
unconditionally, rather than looking for both the suffixed and
unsuffixed versions. this is more in line with how text::xslate
typically works.
Diffstat (limited to 't/mustache-spec.t')
-rw-r--r-- | t/mustache-spec.t | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/t/mustache-spec.t b/t/mustache-spec.t index 88f8560..ae69af5 100644 --- a/t/mustache-spec.t +++ b/t/mustache-spec.t @@ -18,7 +18,15 @@ for my $file (dir('t', 'mustache-spec', 'specs')->children) { && $test->{name} !~ /line endings/i; render_ok( - ($test->{partials} ? ({ path => [$test->{partials}] }) : ()), + ($test->{partials} + ? ({ + suffix => '.mustache', + path => [ + map { +{ "$_.mustache" => $test->{partials}{$_} } } + keys %{ $test->{partials} } + ] + }) + : ()), $test->{template}, fix_data($test->{data}), $test->{expected}, |