This repository has been archived on 2022-12-23. You can view files and clone it, but cannot push or open issues or pull requests.
fuck-premake-old2/tests/actions/vstudio/test_vs2010_project_kinds.lua

48 lines
1.3 KiB
Lua
Raw Normal View History

T.vs2010_project_kinds= { }
local vs10_project_kinds = T.vs2010_project_kinds
local sln, prj
function vs10_project_kinds.setup()
_ACTION = "vs2010"
sln = solution "MySolution"
configurations { "Debug" }
platforms {}
prj = project "MyProject"
language "C++"
end
local function get_buffer()
io.capture()
premake.buildconfigs()
sln.vstudio_configs = premake.vstudio_buildconfigs(sln)
premake.vs2010_vcxproj(prj)
buffer = io.endcapture()
return buffer
end
function vs10_project_kinds.staticLib_doesNotContainLinkSection()
kind "StaticLib"
local buffer = get_buffer()
test.string_does_not_contain(buffer,'<Link>*.*</Link>')
2010-06-16 18:20:41 +00:00
end
function vs10_project_kinds.staticLib_containsLibSection()
kind "StaticLib"
local buffer = get_buffer()
test.string_contains(buffer,'<ItemDefinitionGroup*.*<Lib>*.*</Lib>*.*</ItemDefinitionGroup>')
end
function vs10_project_kinds.staticLib_libSection_containsProjectNameDotLib()
kind "StaticLib"
local buffer = get_buffer()
test.string_contains(buffer,'<Lib>*.*<OutputFile>*.*MyProject.lib*.*</OutputFile>*.*</Lib>')
2010-06-16 18:34:21 +00:00
end
function vs10_project_kinds.sharedLib_fail_asIDoNotKnowWhatItShouldLookLike_printsTheBufferSoICanCompare()
kind "SharedLib"
local buffer = get_buffer()
test.string_contains(buffer,'youWillNotFindThis')
end