File: pandoc-version.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 (20 lines) | stat: -rw-r--r-- 539 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use strict;
use Test::More;
use Test::Exception;

local $ENV{PANDOC_VERSION} = '1.2.3';
require Pandoc::Elements;
is Pandoc::Elements::pandoc_version(), '1.2.3', 'pandoc_version from ENV';

Pandoc::Elements->import('pandoc_version');

$Pandoc::Elements::PANDOC_VERSION = 1.3;
is pandoc_version(), '1.3', 'set pandoc_version via variable';

{
    local $Pandoc::Elements::PANDOC_VERSION = undef;
    is pandoc_version(), '2.17', 'maximum supported version (default)';
}
is pandoc_version(), '1.3', 'localize PANDOC_VERSION';

done_testing;