Merge pull request #836 from Blizzard/fix-setTextColor-xterm

Hook setTextColor in tests, so on linux/mac we don't get random color…
This commit is contained in:
Tom van Dijck 2017-06-21 12:02:12 -07:00 committed by GitHub
commit 273b2fc46e

View File

@ -115,6 +115,7 @@
hooks.os_writefile_ifnotequal = os.writefile_ifnotequal
hooks.p_utf8 = p.utf8
hooks.print = print
hooks.setTextColor = term.setTextColor
local mt = getmetatable(io.stderr)
_.builtin_write = mt.write
@ -128,6 +129,7 @@
os.writefile_ifnotequal = _.stub_os_writefile_ifnotequal
print = _.stub_print
p.utf8 = _.stub_utf8
term.setTextColor = _.stub_setTextColor
stderr_capture = nil
@ -158,6 +160,7 @@
os.writefile_ifnotequal = hooks.os_writefile_ifnotequal
p.utf8 = hooks.p_utf8
print = hooks.print
term.setTextColor = hooks.setTextColor
local mt = getmetatable(io.stderr)
mt.write = _.builtin_write
@ -263,3 +266,7 @@
function _.stub_utf8()
end
function _.stub_setTextColor()
end