diff options
| author | Albert Krewinkel <[email protected]> | 2022-10-04 17:30:12 +0200 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2022-10-04 13:06:23 -0700 |
| commit | 86e009b49547e7072cf099b7990cb7ff2b864979 (patch) | |
| tree | 29b34f6931c3d174271b7788f0a37c04144a7247 /pandoc-lua-engine/test/lua/module | |
| parent | a50765b3e42de0295ffcb090f77f140070b57d0a (diff) | |
Lua: add new module `pandoc.format`.
The module provides functions to query the set of extensions supported
by formats, and the set of extension enabled per default.
Diffstat (limited to 'pandoc-lua-engine/test/lua/module')
| -rw-r--r-- | pandoc-lua-engine/test/lua/module/pandoc-format.lua | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/pandoc-lua-engine/test/lua/module/pandoc-format.lua b/pandoc-lua-engine/test/lua/module/pandoc-format.lua new file mode 100644 index 000000000..86dcd4c6b --- /dev/null +++ b/pandoc-lua-engine/test/lua/module/pandoc-format.lua @@ -0,0 +1,34 @@ +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), + }, +} |
