Common library code for other vc*.nvim projects.

Shorten the logical module name in prints.

+3 -1
+3 -1
lua/vclib/testing.lua
··· 157 157 local total = 0 158 158 for _, test_module_name in ipairs(test_modules) do 159 159 local test_module = require(test_module_name) 160 - output(string.format("=== Running tests in %s ===", test_module_name)) 160 + -- Slightly less verbose name for the test module, removing first component. 161 + local file_name = test_module_name:match "^[^.]+%.(.+)$" or test_module_name 162 + output(string.format("=== Running tests in %s ===", file_name)) 161 163 for suite_name, test_suite in pairs(test_module) do 162 164 local suite_failed, suite_total = _run_test_suite(suite_name, test_suite) 163 165 failed = failed + suite_failed