File: import.t

package info (click to toggle)
libpandoc-wrapper-perl 0.9.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 304 kB
  • sloc: perl: 589; makefile: 5; sh: 1
file content (23 lines) | stat: -rw-r--r-- 682 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
use strict;
use Test::More;
use Test::Exception;

BEGIN {
    require Pandoc;
    if ($ENV{RELEASE_TESTING}) {
        Pandoc->import(qw(-t latex));
    } else {
        plan skip_all => 'these tests are for release candidate testing';
    }
}

is_deeply [ pandoc->arguments ], [qw(-t latex)], 'import with arguments';

throws_ok { Pandoc->VERSION(99) } qr/^pandoc 99 required/, '!use Pandoc 99';
throws_ok { Pandoc->import(99) } qr/^pandoc 99 required/, '!use Pandoc qw(99 ...)';

lives_ok { Pandoc->VERSION(pandoc->version) } "use Pandoc ".pandoc->version;
lives_ok { Pandoc->VERSION('1.9') } "use Pandoc 1.9";
lives_ok { Pandoc->VERSION('v1') } "use Pandoc 'v1'";

done_testing;