aboutsummaryrefslogtreecommitdiff
path: root/pandoc-lua-engine/test/lua/module/pandoc-format.lua
blob: 6a1915a163f75a2c7240c56bb6a39ae5e13b5a3f (plain)
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
42
43
44
45
46
47
48
49
50
51
52
local tasty = require 'tasty'

local test = tasty.test_case
local group = tasty.test_group
local assert = tasty.assert

local format = require 'pandoc.format'

return {
  group 'default_extensions' {
    test('docx', function ()
      local docx_default_exts = {
        'auto_identifiers',
      }
      assert.are_same(format.default_extensions('docx'), docx_default_exts)
    end),
  },

  group 'all_extensions' {
    test('docx', function ()
      local docx_default_exts = {
        'ascii_identifiers',
        'auto_identifiers',
        'citations',
        'east_asian_line_breaks',
        'empty_paragraphs',
        'gfm_auto_identifiers',
        'native_numbering',
        'styles',
      }
      assert.are_same(format.all_extensions('docx'), docx_default_exts)
    end),
  },

  group 'extensions' {
    test('org', function ()
      local org_default_exts = {
        ascii_identifiers = false,
        auto_identifiers = true,
        citations = true,
        east_asian_line_breaks = false,
        fancy_lists = false,
        gfm_auto_identifiers = false,
        smart = false,
        smart_quotes = false,
        special_strings = true,
        task_lists = true,
      }
      assert.are_same(format.extensions 'org', org_default_exts)
    end),
  },
}