Welcome to mirror list, hosted at ThFree Co, Russian Federation.

buildevents.lua « cs2005 « vstudio « actions « tests - github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 213de1b30ca0702926eb936972f732983d24f5d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
--
-- tests/actions/vstudio/cs2005/buildevents.lua
-- Validate the build events in Visual Studio 2005+ .csproj
-- Copyright (c) 2009-2014 Jason Perkins and the Premake project
--

	T.vstudio_cs2005_buildevents = { }
	local suite = T.vstudio_cs2005_buildevents
	local cs2005 = premake.vstudio.cs2005

--
-- Setup
--

	local sln, prj

	function suite.setup()
		sln = test.createsolution()
	end

	local function prepare()
		premake.bake.buildconfigs()
		prj = premake.solution.getproject(sln, 1)
		cs2005.buildevents(prj)
	end

--
-- Prebuild events
--

	function suite.prebuildEvents()
		prebuildcommands { "pre" }
		prepare()
		test.capture [[
  <PropertyGroup>
    <PreBuildEvent>pre</PreBuildEvent>
  </PropertyGroup>
		]]
	end

--
-- Postbuild events
--

	function suite.postbuildEvents()
		postbuildcommands { "post" }
		prepare()
		test.capture [[
  <PropertyGroup>
    <PostBuildEvent>post</PostBuildEvent>
  </PropertyGroup>
		]]
	end