File: 38self_url.t

package info (click to toggle)
libtext-multimarkdown-perl 1.000035-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, jessie, jessie-kfreebsd, stretch
  • size: 1,772 kB
  • ctags: 148
  • sloc: perl: 2,186; makefile: 8
file content (33 lines) | stat: -rw-r--r-- 712 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
use strict;
use warnings;
use Test::More tests => 2;

use_ok( 'Text::MultiMarkdown');

my $instr = <<TXT;
A trivial block[^block] of text with footnote containing self_url.

[^block]:  See http://example.com

TXT

my $m = Text::MultiMarkdown->new(
    self_url => 'self_url.html',
);
my $outstr = <<TXT;
<p>A trivial block<a href="self_url.html#fn:block" id="fnref:block" class="footnote">1</a> of text with footnote containing self_url.</p>

<div class="footnotes">
<hr />
<ol>

<li id="fn:block"><p>See http://example.com<a href="self_url.html#fnref:block" class="reversefootnote">&#160;&#8617;</a></p></li>

</ol>
</div>
TXT

is(
    $m->markdown($instr) => $outstr,
    'Markdown with self_url footnotes'
);