aboutsummaryrefslogtreecommitdiff
path: root/test/lua/module
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2021-10-20 21:40:07 +0200
committerJohn MacFarlane <jgm@berkeley.edu>2021-10-22 11:16:51 -0700
commit9e74826ba9ce4139bfdd3f057a79efa8b644e85a (patch)
tree954692554bfc024b6927de385923ab5c69a4b5df /test/lua/module
parente10f495a0163738a09c3fd18fce11788832c82b7 (diff)
downloadpandoc-9e74826ba9ce4139bfdd3f057a79efa8b644e85a.tar.gz
Switch to hslua-2.0
The new HsLua version takes a somewhat different approach to marshalling and unmarshalling, relying less on typeclasses and more on specialized types. This allows for better performance and improved error messages. Furthermore, new abstractions allow to document the code and exposed functions.
Diffstat (limited to 'test/lua/module')
-rw-r--r--test/lua/module/pandoc-types.lua25
1 files changed, 0 insertions, 25 deletions
diff --git a/test/lua/module/pandoc-types.lua b/test/lua/module/pandoc-types.lua
index d4e063a5c..d9c9f82ac 100644
--- a/test/lua/module/pandoc-types.lua
+++ b/test/lua/module/pandoc-types.lua
@@ -55,31 +55,6 @@ return {
end),
},
- group 'list-like behavior' {
- test('can access version component numbers', function ()
- local version = Version '2.7.3'
- assert.is_nil(version[0])
- assert.are_equal(version[1], 2)
- assert.are_equal(version[2], 7)
- assert.are_equal(version[3], 3)
- end),
- test('can be iterated over', function ()
- local version_list = {2, 7, 3}
- local final_index = 0
- for i, v in pairs(Version(version_list)) do
- assert.are_equal(v, version_list[i])
- final_index = i
- end
- assert.are_equal(final_index, 3)
- end),
- test('length is the number of components', function ()
- assert.are_equal(#(Version '0'), 1)
- assert.are_equal(#(Version '1.6'), 2)
- assert.are_equal(#(Version '8.7.5'), 3)
- assert.are_equal(#(Version '2.9.1.5'), 4)
- end)
- },
-
group 'conversion to string' {
test('converting from and to string is a noop', function ()
local version_string = '1.19.4'