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

test_filters.lua « vc200x « vstudio « actions « tests - github.com/windirstat/premake-4.x.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d2bb3cd198f1ef9b300ba0a49c7b1b29547d2d88 (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
54
55
56
57
58
--
-- tests/actions/vstudio/vc200x/test_filters.lua
-- Validate generation of filter blocks in Visual Studio 200x C/C++ projects.
-- Copyright (c) 2011 Jason Perkins and the Premake project
--

T.vs200x_filters = { }
local suite = T.vs200x_filters
local vc200x = premake.vstudio.vc200x


--
-- Setup/teardown
--

	local sln, prj
	local os_uuid

	function suite.setup()
		os_uuid = os.uuid
		os.uuid = function() return "00112233-4455-6677-8888-99AABBCCDDEE" end

		_ACTION = "vs2008"
		sln, prj = test.createsolution()
	end

	function suite.teardown()
		os.uuid = os_uuid
	end

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


--
-- File/filter assignment tests
--

	function suite.Filter_UsesVirtualForm_OnVpath()
		files { "src/hello.c" }
		vpaths { ["Source Files"] = "**.c" }		
		prepare()
		vc200x.Files(prj)
		test.capture [[
		<Filter
			Name="Source Files"
			Filter=""
			>
			<File
				RelativePath="src\hello.c"
				>
			</File>
		</Filter>
		]]
	end