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:
commit
273b2fc46e
@ -115,6 +115,7 @@
|
|||||||
hooks.os_writefile_ifnotequal = os.writefile_ifnotequal
|
hooks.os_writefile_ifnotequal = os.writefile_ifnotequal
|
||||||
hooks.p_utf8 = p.utf8
|
hooks.p_utf8 = p.utf8
|
||||||
hooks.print = print
|
hooks.print = print
|
||||||
|
hooks.setTextColor = term.setTextColor
|
||||||
|
|
||||||
local mt = getmetatable(io.stderr)
|
local mt = getmetatable(io.stderr)
|
||||||
_.builtin_write = mt.write
|
_.builtin_write = mt.write
|
||||||
@ -128,6 +129,7 @@
|
|||||||
os.writefile_ifnotequal = _.stub_os_writefile_ifnotequal
|
os.writefile_ifnotequal = _.stub_os_writefile_ifnotequal
|
||||||
print = _.stub_print
|
print = _.stub_print
|
||||||
p.utf8 = _.stub_utf8
|
p.utf8 = _.stub_utf8
|
||||||
|
term.setTextColor = _.stub_setTextColor
|
||||||
|
|
||||||
stderr_capture = nil
|
stderr_capture = nil
|
||||||
|
|
||||||
@ -158,6 +160,7 @@
|
|||||||
os.writefile_ifnotequal = hooks.os_writefile_ifnotequal
|
os.writefile_ifnotequal = hooks.os_writefile_ifnotequal
|
||||||
p.utf8 = hooks.p_utf8
|
p.utf8 = hooks.p_utf8
|
||||||
print = hooks.print
|
print = hooks.print
|
||||||
|
term.setTextColor = hooks.setTextColor
|
||||||
|
|
||||||
local mt = getmetatable(io.stderr)
|
local mt = getmetatable(io.stderr)
|
||||||
mt.write = _.builtin_write
|
mt.write = _.builtin_write
|
||||||
@ -263,3 +266,7 @@
|
|||||||
|
|
||||||
function _.stub_utf8()
|
function _.stub_utf8()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function _.stub_setTextColor()
|
||||||
|
end
|
||||||
|
Reference in New Issue
Block a user