Common library code for other vc*.nvim projects.

Colorize header.

+4 -1
+4 -1
lua/vclib/testing.lua
··· 43 FAIL = color "bright red" 44 PASS = color "bright green" 45 NOTE = color "bright black" 46 RESET = color "reset" 47 48 ---@param text string ··· 204 local test_module = require(test_module_name) 205 -- Slightly less verbose name for the test module, removing first component. 206 local file_name = test_module_name:match "^[^.]+%.(.+)$" or test_module_name 207 - output(string.format("=== Running tests in %s ===", file_name)) 208 for suite_name, test_suite in pairs(test_module) do 209 local suite_failed, suite_total, suite_skipped = 210 _run_test_suite(file_name, suite_name, test_suite, should_run_test)
··· 43 FAIL = color "bright red" 44 PASS = color "bright green" 45 NOTE = color "bright black" 46 + HEADER = color "bright blue" 47 RESET = color "reset" 48 49 ---@param text string ··· 205 local test_module = require(test_module_name) 206 -- Slightly less verbose name for the test module, removing first component. 207 local file_name = test_module_name:match "^[^.]+%.(.+)$" or test_module_name 208 + output( 209 + colorize(string.format("=== Running tests in %s ===", file_name), HEADER) 210 + ) 211 for suite_name, test_suite in pairs(test_module) do 212 local suite_failed, suite_total, suite_skipped = 213 _run_test_suite(file_name, suite_name, test_suite, should_run_test)