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/cs2005/propertygroup.lua
2012-07-10 16:44:44 -04:00

59 lines
1.2 KiB
Lua
Executable File

--
-- tests/actions/vstudio/cs2005/propertygroup.lua
-- Validate configuration <PropertyGroup/> elements in Visual Studio 2005+ .csproj
-- Copyright (c) 2009-2011 Jason Perkins and the Premake project
--
T.vstudio_cs2005_propertygroup = { }
local suite = T.vstudio_cs2005_propertygroup
local cs2005 = premake.vstudio.cs2005
local project = premake5.project
--
-- Setup
--
local sln, prj, cfg
function suite.setup()
sln, prj = test.createsolution()
language "C#"
end
local function prepare()
cfg = project.getconfig(prj, "Debug")
cs2005.propertygroup(cfg)
end
--
-- Version Tests
--
function suite.OnVs2005()
_ACTION = "vs2005"
prepare()
test.capture [[
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
]]
end
function suite.OnVs2008()
_ACTION = "vs2008"
prepare()
test.capture [[
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
]]
end
function suite.OnVs2010()
_ACTION = "vs2010"
prepare()
test.capture [[
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
]]
end