File: 02basic.t

package info (click to toggle)
libhtml-template-expr-perl 0.07-3.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, forky, sid, trixie
  • size: 248 kB
  • sloc: perl: 285; makefile: 2
file content (19 lines) | stat: -rw-r--r-- 645 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use Test::More tests => 3;
use HTML::Template::Expr;

my $template = HTML::Template::Expr->new(path => ['t/templates'],
                                      filename => 'foo.tmpl');
$template->param(foo => 100);
my $output = $template->output();
like($output, qr/greater than/i, "greater than");

$template->param(foo => 10);
$output = $template->output();
like($output, qr/less than/i, "less than");


$template = HTML::Template::Expr->new(path => ['t/templates'],
                                      filename => 'negative.tmpl');
$template->param(foo => 100);
$output = $template->output();
like($output, qr/Yes/, "negative numbers work");