Patch 3053959: kind() crashes when called with no arguments (rjmyst3)

This commit is contained in:
Jason Perkins 2010-08-27 10:06:00 -04:00
parent 414ceab997
commit 577d95420f
3 changed files with 12 additions and 1 deletions

View File

@ -11,6 +11,7 @@
* Patch 2997449: Print configuration with target (ergosys)
* Patch 2997452: Suppress gmake's "nothing to be done" message (ergosys)
* Patch 3011940: Add support for MFC (JTAnderson)
* Patch 3053959: kind() crashes when called with no arguments (rjmyst3)
* Bug 2997728: Project dependencies should be case-sensitive
* Fixed handling of icons in Xcode (bitshifter)
* Added imagepath to set Xbox360 image file name (Jarod)

View File

@ -527,7 +527,7 @@
local scope = premake.fields[name].scope
local allowed = premake.fields[name].allowed
if (kind == "string" or kind == "path" and value) then
if ((kind == "string" or kind == "path") and value) then
if type(value) ~= "string" then
error("string value expected", 3)
end

View File

@ -120,6 +120,16 @@
end
--
-- accessor tests
--
function suite.accessor_CanRetrieveString()
sln.blocks[1].kind = "ConsoleApp"
test.isequal("ConsoleApp", kind())
end
--
-- solution() tests
--