Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 26 lines (21 sloc) 0.57 kB
f584f98 @spiritloose Initial commit
authored
1 package MyApp;
2 use Test::More;
3 use Schenker;
4
5 BEGIN {
6 eval 'use Text::MicroTemplate'; ## no critic
7 plan skip_all => 'Text::MicroTemplate not installed' if $@;
8 plan tests => 3;
9 }
10
11 my $schenker = 'Schenker';
12 template test1 => sub {
13 'hello, <?= $_[0] ?> world!';
14 };
15 is(mt('test1', {}, $schenker), 'hello, Schenker world!');
16
17 mt_options tag_start => '[*';
18 mt_options tag_end => '*]';
19 template test2 => sub {
20 'hello, [*= $_[0] *] world!';
21 };
22 is(mt('test2', {}, $schenker), 'hello, Schenker world!');
23
24 # from file
25 like(mt('test'), qr/this is test\.mt/);
Something went wrong with that request. Please try again.