Skip to content

Commit

Permalink
fix(formatter): utf8 chars not displaying in some environments (#723)
Browse files Browse the repository at this point in the history
  • Loading branch information
Commandcracker authored Jun 5, 2023
1 parent 8b8ed2c commit 3def6c1
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions busted/outputHandlers/utfTerminal.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,16 @@ return function(options)
end
end

local successDot = colors.green('')
local failureDot = colors.red('')
local errorDot = colors.magenta('')
local pendingDot = colors.yellow('')
local successDot = colors.green('\226\151\143') -- '\226\151\143' = '●' = utf8.char(9679)
local failureDot = colors.red('\226\151\188') -- '\226\151\188' = '◼' = utf8.char(9724)
local errorDot = colors.magenta('\226\156\177') -- '\226\156\177' = '✱' = utf8.char(10033)
local pendingDot = colors.yellow('\226\151\140') -- '\226\151\140' = '◌' = utf8.char(9676)

local pendingDescription = function(pending)
local name = pending.name

local string = colors.yellow(s('output.pending')) .. '' ..
-- '\226\134\146' = '→' = utf8.char('8594')
local string = colors.yellow(s('output.pending')) .. ' \226\134\146 ' ..
colors.cyan(pending.trace.short_src) .. ' @ ' ..
colors.cyan(pending.trace.currentline) ..
'\n' .. colors.bright(name)
Expand Down Expand Up @@ -85,9 +86,10 @@ return function(options)
end

local failureDescription = function(failure, isError)
local string = colors.red(s('output.failure')) .. ''
-- '\226\134\146' = '→' = utf8.char(8594)
local string = colors.red(s('output.failure')) .. ' \226\134\146 '
if isError then
string = colors.magenta(s('output.error')) .. ' '
string = colors.magenta(s('output.error')) .. ' \226\134\146 '
end

if not failure.element.trace or not failure.element.trace.short_src then
Expand Down

0 comments on commit 3def6c1

Please sign in to comment.