diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2021-11-01 08:14:44 +0100 |
---|---|---|
committer | Albert Krewinkel <albert@zeitkraut.de> | 2021-11-01 08:27:14 +0100 |
commit | 96e76d4cd475fe479ae6fb36bd6feee1cc6ff39f (patch) | |
tree | 8d67dba95faba2bc73d2cfbc66d317a2390a3744 /test | |
parent | 171bfd3d652479dab18df4062e24fc7237005859 (diff) | |
download | pandoc-96e76d4cd475fe479ae6fb36bd6feee1cc6ff39f.tar.gz |
Lua: restore List behavior of MetaList
Fixes a regression introduced in 2.16 which had MetaList elements loose
the `pandoc.List` properties.
Fixes #7650
Diffstat (limited to 'test')
-rw-r--r-- | test/lua/module/pandoc.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/lua/module/pandoc.lua b/test/lua/module/pandoc.lua index b18a01faa..4e0b5188e 100644 --- a/test/lua/module/pandoc.lua +++ b/test/lua/module/pandoc.lua @@ -278,6 +278,19 @@ return { end) }, }, + group 'MetaValue elements' { + test('MetaList elements behave like lists', function () + local metalist = pandoc.MetaList{} + assert.are_equal(type(metalist.insert), 'function') + assert.are_equal(type(metalist.remove), 'function') + end), + test('MetaList, MetaMap, MetaInlines, MetaBlocks have `t` tag', function () + assert.are_equal((pandoc.MetaList{}).t, 'MetaList') + assert.are_equal((pandoc.MetaMap{}).t, 'MetaMap') + assert.are_equal((pandoc.MetaInlines{}).t, 'MetaInlines') + assert.are_equal((pandoc.MetaBlocks{}).t, 'MetaBlocks') + end) + }, group 'Other types' { group 'SimpleTable' { test('can access properties', function () |