use RTF::HTML::Converter; my $result; my $self = new RTF::HTML::Converter(Output => \$result); my @RTF_Documents = split (/\n/, <<'DATA'); {} # Ok! {\par} # Ok! {string\par} # Ok! {\b bold \i Bold Italic \i0 Bold again} # Ok! {\b bold {\i Bold Italic }Bold again} # Ok! {\b bold \i Bold Italic \plain\b Bold again} # Ok! DATA my @HTML_Documents = (<<'D1;',<<'D2;',<<'D3;',<<'D4;',<<'D5;', <<'D6;'); D1; D2;

string

D3; bold Bold Italic Bold again D4; bold Bold Italic Bold again D5; bold Bold Italic Bold again D6; print "1..", @RTF_Documents+0, "\n"; my $test = 0; foreach (@RTF_Documents) { $test++; s/\#.*//; $result = ''; $self->parse_string($_); if ($result eq $HTML_Documents[$test-1]) { print "ok $test\n"; } else { print STDERR "$_\n"; print STDERR $HTML_Documents[$test-1], "\n"; print STDERR "$result\n"; } } __DATA__