The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
use strict;
use warnings;

use Test::More tests => 2;

use HTML::FormFu;

my $form = HTML::FormFu->new(
    { tt_args => { INCLUDE_PATH => 'share/templates/tt/xhtml' } } );

$form->auto_fieldset(1);

my $block = $form->element(
    {   type        => 'Src',
        content_xml => 'Hello <i>World</i>!',
    } );

my $block_xhtml = qq{
Hello <i>World</i>!
};

is( $block, $block_xhtml );

my $form_xhtml = <<EOF;
<form action="" method="post">
<fieldset>
$block_xhtml
</fieldset>
</form>
EOF

is( $form, $form_xhtml );