Common library code for other vc*.nvim projects.

Colorize header.

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