#!/usr/bin/env perl use strict; use warnings; use Test::More tests => 11; use MarkdownParser; my $parser = MarkdownParser->new(); is( $parser->parse("**bold text**"), "
bold text
\n", "Bold with **" ); is( $parser->parse("__bold text__"), "bold text
\n", "Bold with __" ); is( $parser->parse("*italic text*"), "italic text
\n", "Italic with *" ); is( $parser->parse("_italic text_"), "italic text
\n", "Italic with _" ); is( $parser->parse("**bold** and *italic*"), "bold and italic
\n", "Bold and italic together" ); is( $parser->parse("Text with **bold** in middle"), "Text with bold in middle
\n", "Bold in middle of text" ); is( $parser->parse("Text with *italic* in middle"), "Text with italic in middle
\n", "Italic in middle of text" ); is( $parser->parse("**bold** *italic* **bold again**"), "bold italic bold again
\n", "Multiple formatting" ); is( $parser->parse("***bold text***"), "bold text
\n", "Bold with ***" ); is( $parser->parse("**bold *italic* bold**"), "bold italic bold
\n", "Nested formatting" ); is( $parser->parse("___bold text___"), "bold text
\n", "Bold with ___" );