From e0bf4bfe82a2246b9ea04cfbb97dff072d42f3f6 Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Tue, 2 Feb 2021 22:52:32 +0100 Subject: Check that all documented functions are present. Rely on tests in the module package to check the correctness of each function. --- test/lua/module/pandoc-path.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) 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) + } } -- cgit v1.2.3