31 lines
593 B
Perl
Executable File
31 lines
593 B
Perl
Executable File
#!/usr/bin/env perl
|
|
use strict;
|
|
use warnings;
|
|
|
|
use Test::More tests => 4;
|
|
use MarkdownParser;
|
|
|
|
my $parser = MarkdownParser->new();
|
|
|
|
is(
|
|
$parser->parse("Text with <tag>"),
|
|
"<p>Text with <tag></p>\n",
|
|
"HTML tags escaped"
|
|
);
|
|
is(
|
|
$parser->parse("Text with & symbol"),
|
|
"<p>Text with & symbol</p>\n",
|
|
"Ampersand escaped"
|
|
);
|
|
is(
|
|
$parser->parse('Text with "quotes"'),
|
|
"<p>Text with "quotes"</p>\n",
|
|
"Quotes escaped"
|
|
);
|
|
is(
|
|
$parser->parse("Text with 'apostrophe'"),
|
|
"<p>Text with 'apostrophe'</p>\n",
|
|
"Apostrophe escaped"
|
|
);
|
|
|