File: 03-else_else_bug.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 (8 lines) | stat: -rw-r--r-- 346 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8

use Test::More qw/no_plan/;
use HTML::Template;

my $text = qq{Before.  <TMPL_IF NAME="TEST"> 1.  <TMPL_ELSE> 2.  <TMPL_ELSE> 3.  </TMPL_IF> After.};

eval { my $template = HTML::Template->new(debug => 0, scalarref => \$text,); };
like($@, qr/found second <TMPL_ELSE> tag/, "including 2 <tmpl_else> tags for one tmpl_if should throw an error");