aboutsummaryrefslogtreecommitdiff
path: root/test/lua/module
diff options
context:
space:
mode:
Diffstat (limited to 'test/lua/module')
-rw-r--r--test/lua/module/pandoc-list.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/lua/module/pandoc-list.lua b/test/lua/module/pandoc-list.lua
index faa5e966e..fb0c1c495 100644
--- a/test/lua/module/pandoc-list.lua
+++ b/test/lua/module/pandoc-list.lua
@@ -6,6 +6,15 @@ local test = tasty.test_case
local group = tasty.test_group
return {
+ group 'List as function' {
+ test('equivalent to List:new', function (x)
+ local new = List:new {'ramen'}
+ local list = List {'ramen'}
+ assert.are_same(new, list)
+ assert.are_equal(getmetatable(new), getmetatable(list))
+ end)
+ },
+
group 'new' {
test('make table usable as list', function ()
local test = List:new{1, 1, 2, 3, 5}