summaryrefslogtreecommitdiffstats
path: root/t/expressions.t
blob: 0a3ebf3fc64bc7217ffd58b8a8161dd7290401d3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/usr/bin/env perl
use strict;
use warnings;
use lib 't/lib';
use Test::More;
use Test::Handlebars;

render_ok(
    '<h1>{{title}}</h1>',
    { title => 'Xslate rocks' },
    '<h1>Xslate rocks</h1>',
    "basic variables"
);

render_ok(
    '<h1>{{article.title}}</h1>',
    { article => { title => 'Hash references rock' } },
    '<h1>Hash references rock</h1>',
    ". separator"
);

render_ok(
    '<h1>{{article/title}}</h1>',
    { article => { title => 'Deprecated syntax does not' } },
    '<h1>Deprecated syntax does not</h1>',
    "/ separator"
);

done_testing;