use Test::More tests => 1;
use HTML::Template::Expr;

use strict;

my $template = q{<TMPL_IF EXPR="int(rand(2))==0">YES<TMPL_ELSE>NO</TMPL_IF>};

my $htmlt_obj = HTML::Template::Expr->new(
	scalarref => \$template
);

my $good = 1;
for (1..200) {
	my $r = $htmlt_obj->output;
	if ($r ne 'YES' && $r ne 'NO') {
		$good = 0;
		last;
	};
};

ok($good, 'expr with random outcome work');
