use strict; use warnings; use Test::More tests => 5; #1 use_ok( 'Text::MultiMarkdown'); my $instr = q{A trivial block of text}; my $m = Text::MultiMarkdown->new(); my $outstr = qq{

A trivial block of text

\n}; is( #2 $m->markdown($instr) => $outstr, 'Markdown' ); $m = Text::MultiMarkdown->new(); $outstr = qq{ \n\t\n\t\n\n

A trivial block of text

\n\n}; is( #3 $m->markdown($instr, {document_format => 'Complete'}) => $outstr, 'Markdown with complete xhtml doc' ); $instr = q{title: A page title css: somestyle.css other: some metadata A trivial block of text}; $outstr = qq{ \n\t\n\t\t \t\t \t\tA page title\n\t\n\n

A trivial block of text

\n\n}; is( #4 $m->markdown($instr, {document_format => 'complete'}) => $outstr, 'Markdown with complete xhtml doc (and metadata)' ); $outstr = qq{css: somestyle.css
\nother: some metadata
\ntitle: A page title
\n

A trivial block of text

\n}; is( #5 $m->markdown($instr) => $outstr, 'Markdown withmetadata, but no complete doc' );