#!/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( '

{{title}}

{{{body}}}

', { title => 'My New Post', body => 'This is my first post!' }, '

My New Post

This is my first post!

', "raw body", ); render_ok( '

{{title}}

{{{body}}}

', { title => 'All About

Tags', body => 'This is a post about <p> tags' }, '

All About <p> Tags

This is a post about <p> tags

', "raw body with html" ); render_ok( '

{{title}}

{{{body}}}

', { title => mark_raw('All About <p> Tags'), body => 'This is a post about <p> tags' }, '

All 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;