File: synopsis_text_hogan.t

package info (click to toggle)
libtext-hogan-perl 2.01-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 240 kB
  • sloc: perl: 826; sh: 4; makefile: 2
file content (17 lines) | stat: -rw-r--r-- 316 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env perl

use strict;
use warnings;

use Test::More;

use Text::Hogan::Compiler;

my $text = "Hello, {{name}}!";

my $compiler = Text::Hogan::Compiler->new;
my $template = $compiler->compile($text);

is $template->render({ name => "Alex" }), "Hello, Alex!", "Text::Hogan synopsis works";

done_testing();