File: 01coderefs.t

package info (click to toggle)
libhtml-template-pro-perl 0.9502-1%2Bsqueeze1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,584 kB
  • ctags: 860
  • sloc: ansic: 1,814; perl: 1,442; yacc: 410; pascal: 118; makefile: 5
file content (12 lines) | stat: -rw-r--r-- 347 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
use strict;
use Test::More qw(no_plan);
use HTML::Template::Pro;

my ($output, $template, $result);

# test escapes with code-refs
$template = HTML::Template->new(path => 'templates',
                                filename => 'escape.tmpl');
$template->param(STUFF => sub { '<>"\'' } ); 
$output = $template->output;
ok($output !~ /[<>"']/); #"