blob: 730196f6848e683c783ec8878072b863af5abdef (
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
30
31
32
33
34
|
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use Text::Handlebars;
my $tx = Text::Handlebars->new;
is(
$tx->render_string(
'<h1>{{title}}</h1>',
{ title => 'Xslate rocks' },
),
'<h1>Xslate rocks</h1>',
);
is(
$tx->render_string(
'<h1>{{article.title}}</h1>',
{ article => { title => 'Hash references rock' } },
),
'<h1>Hash references rock</h1>',
);
is(
$tx->render_string(
'<h1>{{article/title}}</h1>',
{ article => { title => 'Deprecated syntax does not' } },
),
'<h1>Deprecated syntax does not</h1>',
);
done_testing;
|