diff options
author | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 22:39:54 +0000 |
---|---|---|
committer | Josh Rahm <joshuarahm@gmail.com> | 2023-11-29 22:39:54 +0000 |
commit | 21cb7d04c387e4198ca8098a884c78b56ffcf4c2 (patch) | |
tree | 84fe5690df1551f0bb2bdfe1a13aacd29ebc1de7 /test/busted/outputHandlers/nvim.lua | |
parent | d9c904f85a23a496df4eb6be42aa43f007b22d50 (diff) | |
parent | 4a8bf24ac690004aedf5540fa440e788459e5e34 (diff) | |
download | rneovim-colorcolchar.tar.gz rneovim-colorcolchar.tar.bz2 rneovim-colorcolchar.zip |
Merge remote-tracking branch 'upstream/master' into colorcolcharcolorcolchar
Diffstat (limited to 'test/busted/outputHandlers/nvim.lua')
-rw-r--r-- | test/busted/outputHandlers/nvim.lua | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/busted/outputHandlers/nvim.lua b/test/busted/outputHandlers/nvim.lua index 2ce32c3b7a..4bfa21fe49 100644 --- a/test/busted/outputHandlers/nvim.lua +++ b/test/busted/outputHandlers/nvim.lua @@ -1,9 +1,15 @@ local pretty = require 'pl.pretty' local global_helpers = require('test.helpers') --- Colors are disabled by default. #15610 local colors = setmetatable({}, {__index = function() return function(s) return s == nil and '' or tostring(s) end end}) + +local enable_colors = true if os.getenv "TEST_COLORS" then + local test_colors = os.getenv("TEST_COLORS"):lower() + local disable_colors = test_colors == 'false' or test_colors == '0' or test_colors == 'no' or test_colors == 'off' + enable_colors = not disable_colors +end +if enable_colors then colors = require 'term.colors' end @@ -204,7 +210,7 @@ return function(options) handler.fileStart = function(file) fileTestCount = 0 - io.write(fileStartString:format(file.name)) + io.write(fileStartString:format(vim.fs.normalize(file.name))) io.flush() return nil, true end @@ -213,7 +219,7 @@ return function(options) local elapsedTime_ms = getElapsedTime(file) local tests = (fileTestCount == 1 and 'test' or 'tests') fileCount = fileCount + 1 - io.write(fileEndString:format(fileTestCount, tests, file.name, elapsedTime_ms)) + io.write(fileEndString:format(fileTestCount, tests, vim.fs.normalize(file.name), elapsedTime_ms)) io.flush() return nil, true end |