Test string shadow

This commit is contained in:
Kampfkarren 2022-07-26 18:49:50 -07:00
parent 5a6912fe75
commit 7fbe3a006c

View file

@ -46,6 +46,11 @@ assertEq(`1 {`2 {`3 {4}`}`}`, "1 2 3 4")
local health = 50
assert(`You have {health}% health` == "You have 50% health")
-- INTERP TODO: Test with shadowing `string` (both as a string and not)
local function shadowsString(string)
return `Value is {string}`
end
assertEq(shadowsString("hello"), "Value is hello")
assertEq(shadowsString(1), "Value is 1")
return "OK"