aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Lua/Module.hs2
-rw-r--r--test/lua/module/pandoc-path.lua17
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),
+ },
+}