1--
2-- tests/actions/vstudio/vc2010/test_manifest.lua
3-- Validate generation of Manifest block in Visual Studio 201x C/C++ projects.
4-- Copyright (c) 2009-2013 Jason Perkins and the Premake project
5--
6
7	local p = premake
8	local suite = test.declare("vs2010_manifest")
9	local vc2010 = p.vstudio.vc2010
10	local project = p.project
11
12
13--
14-- Setup
15--
16
17	local wks, prj
18
19	function suite.setup()
20		p.action.set("vs2010")
21		wks, prj = test.createWorkspace()
22		kind "ConsoleApp"
23	end
24
25	local function prepare(platform)
26		local cfg = test.getconfig(prj, "Debug", platform)
27		vc2010.manifest(cfg)
28	end
29
30
31--
32-- Check the basic element structure with default settings.
33--
34
35	function suite.defaultSettings()
36		files { "source/test.manifest" }
37		prepare()
38		test.capture [[
39<Manifest>
40	<AdditionalManifestFiles>source/test.manifest %(AdditionalManifestFiles)</AdditionalManifestFiles>
41</Manifest>
42		]]
43	end
44
45--
46-- Check that there is no manifest when using static lib
47--
48
49	function suite.staticLib()
50		kind "StaticLib"
51		files { "test.manifest" }
52		prepare()
53		test.isemptycapture()
54	end
55