diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2021-01-27 15:17:39 +0100 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-02-02 21:04:30 -0800 |
commit | 61b108d52789f20fb03c4f8a74719c1d53021c91 (patch) | |
tree | 9c798380274ade60da91ec98adbbcb2e91e90efc /test | |
parent | 2415b2680a522e89b63abb370c02bfff54b824a2 (diff) | |
download | pandoc-61b108d52789f20fb03c4f8a74719c1d53021c91.tar.gz |
Lua: add module "pandoc.path"
The module allows to work with file paths in a convenient and
platform-independent manner.
Closes: #6001
Closes: #6565
Diffstat (limited to 'test')
-rw-r--r-- | test/Tests/Lua/Module.hs | 2 | ||||
-rw-r--r-- | test/lua/module/pandoc-path.lua | 17 |
2 files changed, 19 insertions, 0 deletions
diff --git a/test/Tests/Lua/Module.hs b/test/Tests/Lua/Module.hs index d88633cf8..8be445f65 100644 --- a/test/Tests/Lua/Module.hs +++ b/test/Tests/Lua/Module.hs @@ -25,6 +25,8 @@ tests = ("lua" </> "module" </> "pandoc-list.lua") , testPandocLua "pandoc.mediabag" ("lua" </> "module" </> "pandoc-mediabag.lua") + , testPandocLua "pandoc.path" + ("lua" </> "module" </> "pandoc-path.lua") , testPandocLua "pandoc.types" ("lua" </> "module" </> "pandoc-types.lua") , testPandocLua "pandoc.util" diff --git a/test/lua/module/pandoc-path.lua b/test/lua/module/pandoc-path.lua new file mode 100644 index 000000000..9a5a3f6c8 --- /dev/null +++ b/test/lua/module/pandoc-path.lua @@ -0,0 +1,17 @@ +local tasty = require 'tasty' +local path = require 'pandoc.path' + +local assert = tasty.assert +local test = tasty.test_case +local group = tasty.test_group + +return { + group 'path separator' { + test('is string', function () + assert.are_same(type(path.separator), 'string') + end), + test('is slash or backslash', function () + assert.is_truthy(path.separator:match '^[/\\]$') + end), + }, +} |