diff options
author | Thiago de Arruda <tpadilha84@gmail.com> | 2015-03-17 08:17:03 -0300 |
---|---|---|
committer | Thiago de Arruda <tpadilha84@gmail.com> | 2015-03-24 12:46:15 -0300 |
commit | 5874bc28ea4c649b722eb993d2bd2beea7e3f6d1 (patch) | |
tree | 6d4c9238376d71adf767171ae1a9546e4af40aa2 /third-party/utfTerminalDetailed.lua | |
parent | 5860d65f9cf4205b845e4fb5e8512ef8929cf227 (diff) | |
download | rneovim-5874bc28ea4c649b722eb993d2bd2beea7e3f6d1.tar.gz rneovim-5874bc28ea4c649b722eb993d2bd2beea7e3f6d1.tar.bz2 rneovim-5874bc28ea4c649b722eb993d2bd2beea7e3f6d1.zip |
deps: Update busted and dependencies
Diffstat (limited to 'third-party/utfTerminalDetailed.lua')
-rw-r--r-- | third-party/utfTerminalDetailed.lua | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/third-party/utfTerminalDetailed.lua b/third-party/utfTerminalDetailed.lua index 4d7a7c1d6f..5a52dfa958 100644 --- a/third-party/utfTerminalDetailed.lua +++ b/third-party/utfTerminalDetailed.lua @@ -1,13 +1,18 @@ -- busted output handler that immediately prints file and test names before -- tests are executed. It simplifies identifying which tests are -- hanging/crashing -local ansicolors = require 'ansicolors' +if package.config:sub(1,1) == '\\' and not os.getenv("ANSICON") then + -- Disable colors on Windows. + colors = setmetatable({}, {__index = function() return function(s) return s end end}) +else + colors = require 'term.colors' +end return function(options, busted) local handler = require 'busted.outputHandlers.utfTerminal'(options, busted) handler.fileStart = function(name) - io.write('\n' .. ansicolors('%{cyan}' .. name) .. ':') + io.write('\n' .. colors.cyan(name) .. ':') end handler.testStart = function(element, parent, status, debug) |