File: 04-default_with_escape.t

package info (click to toggle)
libhtml-template-perl 2.97-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 740 kB
  • sloc: perl: 2,572; makefile: 8
file content (14 lines) | stat: -rw-r--r-- 312 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use Test::More qw/no_plan/;
use HTML::Template;

my $text = qq{Foo: <tmpl_var foo default='0' escape=JS>};

my $template = HTML::Template->new(
    #        debug => 1,
    #        stack_debug => 1,
    scalarref => \$text,
);
$template->param(foo => 1);
my $output = $template->output;

is($output, "Foo: 1");