File: lineblocks-empty-lines.t

package info (click to toggle)
libpandoc-elements-perl 0.38-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 732 kB
  • sloc: perl: 1,630; makefile: 15; sh: 1
file content (41 lines) | stat: -rw-r--r-- 615 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
34
35
36
37
38
39
40
41
use Test::More 0.96;
use Test::Warnings qw(warnings :no_end_test);

use Pandoc::Elements;
use Pandoc;

plan skip_all => 'pandoc >= 1.18 not available'
    unless (pandoc and pandoc->version >= '1.18');

my $lineblock = <<'END_OF_MD';
| Sven Svensson
|
|
|
| Tel: 0123-45 67 89
|
| Adress:
|
| Storgatan 42
| 123 45 Storstad
| Sverige
END_OF_MD

my $doc = pandoc->parse(markdown => $lineblock);

my $json;

is_deeply [
    warnings {
        $json = $doc->to_json;
    }
], [], 'uninitialized';

is_deeply [
    warnings {
        my $doc = pandoc->parse( json => $json );
    }
], [], 'parse json';

done_testing;