From 5874bc28ea4c649b722eb993d2bd2beea7e3f6d1 Mon Sep 17 00:00:00 2001 From: Thiago de Arruda Date: Tue, 17 Mar 2015 08:17:03 -0300 Subject: deps: Update busted and dependencies --- third-party/utfTerminalDetailed.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'third-party/utfTerminalDetailed.lua') 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) -- cgit