X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=xt%2Ftt.t;fp=xt%2Ftt.t;h=cd026e77da48e62c8072b05f6ff4217b2167eb68;hb=c3ffad02009566171a1c9ca13bef64c51d853d29;hp=573c141bf469ff3544a17dd4077ea9274ee40631;hpb=6d07a2d06b4a2db5d47937ba000ff5a278d11db0;p=scpubgit%2FHTML-String.git diff --git a/xt/tt.t b/xt/tt.t index 573c141..cd026e7 100644 --- a/xt/tt.t +++ b/xt/tt.t @@ -46,4 +46,22 @@ is( is( do_tt('"0"', {}), '"0"' ); +{ + my $tmpl = q[ + [%- MACRO test(name, value) BLOCK; + IF !value.length; + "ok"; + END; + END; -%] +[%- test("foo", "") -%] +]; + + my $with_html_string_tt = do_tt($tmpl, {}); + + $tt = Template->new(STASH => Template::Stash->new); + my $with_template = do_tt($tmpl, {}); + + is $with_html_string_tt, $with_template; +} + done_testing;