aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2021-09-09 09:18:43 -0700
committerGitHub <noreply@github.com>2021-09-09 09:18:43 -0700
commit13748512f6d6dfb5895c2233d2e07480e00eb753 (patch)
treefc61395b9ac71b353839488924a8a3102126b271
parent422198cde69ffc857fd459ffd662b640a680cc48 (diff)
downloadrneovim-13748512f6d6dfb5895c2233d2e07480e00eb753.tar.gz
rneovim-13748512f6d6dfb5895c2233d2e07480e00eb753.tar.bz2
rneovim-13748512f6d6dfb5895c2233d2e07480e00eb753.zip
test(busted): disable colors in test-runner output #15610
Problem ------- Because test/busted/outputHandlers/nvim.lua doesn't know if it's running in a terminal (no "isatty" equivalent), it outputs color codes in CI logs and local tooling that runs the tests in a pipe: [1m[ SKIPPED ]  This is just noise, hard for humans to read. Solution -------- Disable the color codes. If we later find a clever way to detect a terminal in nvim.lua, we might consider re-enabling colors, but that would still affect the CI build logs...
-rw-r--r--test/busted/outputHandlers/nvim.lua12
1 files changed, 3 insertions, 9 deletions
diff --git a/test/busted/outputHandlers/nvim.lua b/test/busted/outputHandlers/nvim.lua
index 5456e9ca98..17154f1aa2 100644
--- a/test/busted/outputHandlers/nvim.lua
+++ b/test/busted/outputHandlers/nvim.lua
@@ -1,15 +1,9 @@
local pretty = require 'pl.pretty'
local global_helpers = require('test.helpers')
-local colors
-
-local isWindows = package.config:sub(1,1) == '\\'
-
-if isWindows then
- colors = setmetatable({}, {__index = function() return function(s) return s end end})
-else
- colors = require 'term.colors'
-end
+-- Colors are disabled. #15610
+-- To enable: `local colors = require 'term.colors'`
+local colors = setmetatable({}, {__index = function() return function(s) return s end end})
return function(options)
local busted = require 'busted'