2013-09-06 15:32:06 +00:00
|
|
|
--
|
|
|
|
-- tests/actions/vstudio/vc2010/test_manifest.lua
|
|
|
|
-- Validate generation of Manifest block in Visual Studio 201x C/C++ projects.
|
2013-09-18 14:50:00 +00:00
|
|
|
-- Copyright (c) 2009-2013 Jason Perkins and the Premake project
|
2013-09-06 15:32:06 +00:00
|
|
|
--
|
|
|
|
|
|
|
|
local suite = test.declare("vs2010_manifest")
|
|
|
|
local vc2010 = premake.vstudio.vc2010
|
2013-09-18 14:50:00 +00:00
|
|
|
local project = premake.project
|
2013-09-06 15:32:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Setup
|
|
|
|
--
|
|
|
|
|
|
|
|
local sln, prj, cfg
|
|
|
|
|
|
|
|
function suite.setup()
|
|
|
|
_ACTION = "vs2010"
|
|
|
|
sln, prj = test.createsolution()
|
|
|
|
kind "ConsoleApp"
|
|
|
|
end
|
|
|
|
|
|
|
|
local function prepare(platform)
|
|
|
|
cfg = project.getconfig(prj, "Debug", platform)
|
|
|
|
vc2010.manifest(cfg)
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Check the basic element structure with default settings.
|
|
|
|
--
|
|
|
|
|
|
|
|
function suite.defaultSettings()
|
|
|
|
files { "source/test.manifest" }
|
|
|
|
prepare()
|
|
|
|
test.capture [[
|
|
|
|
<Manifest>
|
|
|
|
<AdditionalManifestFiles>source/test.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
|
|
|
|
</Manifest>
|
|
|
|
]]
|
|
|
|
end
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Check that there is no manifest when using static lib
|
|
|
|
--
|
|
|
|
|
|
|
|
function suite.staticLib()
|
|
|
|
kind "StaticLib"
|
|
|
|
files { "test.manifest" }
|
|
|
|
prepare()
|
2013-09-18 14:50:00 +00:00
|
|
|
test.isemptycapture()
|
2013-09-06 15:32:06 +00:00
|
|
|
end
|