#!/usr/bin/env perl use strict; use warnings; use lib 't/lib'; use Test::More; use Test::Handlebars; use Text::Xslate 'mark_raw'; render_ok( '
{{{body}}}
', { title => 'My New Post', body => 'This is my first post!' }, 'This is my first post!
', "raw body", ); render_ok( '{{{body}}}
', { title => 'All AboutTags', body => 'This is a post about <p> tags' }, '
This is a post about <p> tags
', "raw body with html" ); render_ok( '{{{body}}}
', { title => mark_raw('All About <p> Tags'), body => 'This is a post about <p> tags' }, 'This is a post about <p> tags
', "raw title with manual mark_raw() call" ); render_ok( <<'TEMPLATE', * {{name}} * {{age}} * {{company}} * {{& company}} TEMPLATE { name => 'Chris', company => 'GitHub', }, <<'RENDERED', * Chris * * <b>GitHub</b> * GitHub RENDERED "mark_raw via &" ); done_testing;