aboutsummaryrefslogtreecommitdiff
path: root/test/lua
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2021-02-02 22:52:32 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2021-02-02 21:04:30 -0800
commite0bf4bfe82a2246b9ea04cfbb97dff072d42f3f6 (patch)
tree5895c4977a4ff2679c267c608b3c7f21ab08f276 /test/lua
parent2ace15964b91be01fa35d9cc361942770c0e5def (diff)
downloadpandoc-e0bf4bfe82a2246b9ea04cfbb97dff072d42f3f6.tar.gz
Check that all documented functions are present.
Rely on tests in the module package to check the correctness of each function.
Diffstat (limited to 'test/lua')
-rw-r--r--test/lua/module/pandoc-path.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/lua/module/pandoc-path.lua b/test/lua/module/pandoc-path.lua
index 9a5a3f6c8..7f3b21fe2 100644
--- a/test/lua/module/pandoc-path.lua
+++ b/test/lua/module/pandoc-path.lua
@@ -14,4 +14,23 @@ return {
assert.is_truthy(path.separator:match '^[/\\]$')
end),
},
+ group 'module' {
+ test('check function existence', function ()
+ local functions = {
+ 'directory',
+ 'filename',
+ 'is_absolute',
+ 'is_relative',
+ 'join',
+ 'make_relative',
+ 'normalize',
+ 'split',
+ 'split_extension',
+ 'split_search_path',
+ }
+ for _, f in ipairs(functions) do
+ assert.are_equal(type(path[f]), 'function')
+ end
+ end)
+ }
}