Debian Codegraph @

t/902-markdown-test-suite.t

raw
1 use strict;
2 use warnings;
3 use utf8;
4
5 use FindBin;
6 use lib "${FindBin::Bin}/lib";
7
8 use Markdown::Perl;
9 use MmdTest;
10 use Test2::V0;
11
12 my %opt = (
13 todo => [
14 # We will probably never support this test, which has quotes inside link
15 # titles that are in quotes. The "spec" does not say anything about that and
16 # it would be a nightmare to parse it.
17 16,
18 ],
19 # These are bugs in the Markdown "spec", not in our implementation. All of
20 # these have been tested to be buggy in the real Markdown.pl implementation.
21 bugs => [
22 # The original implementation will emit <strong><em> tag for ***foo***,
23 # however this does not extrapolate well to other cases. In particular:
24 # ***foo** bar* is rendered as the buggy <strong><em>foo</strong> bar</em>
25 21,
26 ],
27 );
28
29 while ($_ = shift) {
30 $opt{test_num} = shift @ARGV if /^-n$/;
31 }
32 $opt{ext} = 'xhtml';
33
34 my $pmarkdown = Markdown::Perl->new(mode => 'markdown');
35
36 my $n = test_suite("${FindBin::Bin}/../third_party/mdtest/Markdown.mdtest", $pmarkdown, %opt);
37
38 done_testing;