aboutsummaryrefslogtreecommitdiff
path: root/test/lua
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2021-01-27 15:17:39 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2021-02-02 21:04:30 -0800
commit61b108d52789f20fb03c4f8a74719c1d53021c91 (patch)
tree9c798380274ade60da91ec98adbbcb2e91e90efc /test/lua
parent2415b2680a522e89b63abb370c02bfff54b824a2 (diff)
downloadpandoc-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/lua')
-rw-r--r--test/lua/module/pandoc-path.lua17
1 files changed, 17 insertions, 0 deletions
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),
+ },
+}