feat: add unit tests

This commit is contained in:
2025-11-12 19:28:48 +01:00
parent 0eca6d6725
commit 6e9ce92cde
12 changed files with 510 additions and 0 deletions

25
t/07-blockquotes.t Executable file
View File

@@ -0,0 +1,25 @@
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More tests => 3;
use MarkdownParser;
my $parser = MarkdownParser->new();
is(
$parser->parse("> Quote text"),
"<blockquote>\n<p>Quote text</p>\n</blockquote>\n",
"Simple blockquote"
);
is(
$parser->parse("> First line\n> Second line"),
"<blockquote>\n<p>First line</p>\n<p>Second line</p>\n</blockquote>\n",
"Multi-line blockquote"
);
is(
$parser->parse("> Quote with **bold**"),
"<blockquote>\n<p>Quote with <strong>bold</strong></p>\n</blockquote>\n",
"Blockquote with formatting"
);