1use strict;
2use warnings;
3
4use Test::More tests => 2;
5
6use HTML::FormFu;
7
8my $form = HTML::FormFu->new(
9    { tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } } );
10
11$form->auto_fieldset(1);
12
13my $block = $form->element(
14    {   type    => 'Block',
15        tag     => 'span',
16        content => 'Hello <World>!',
17    } );
18
19$block->element( { name => "foo" } );
20
21# because there's a content(), the block's elements should be ignored
22
23my $block_xhtml = qq{<span>
24Hello &lt;World&gt;!
25</span>};
26
27is( $block, $block_xhtml );
28
29my $form_xhtml = <<EOF;
30<form action="" method="post">
31<fieldset>
32$block_xhtml
33</fieldset>
34</form>
35EOF
36
37is( $form, $form_xhtml );
38
39