57 lines
1.1 KiB
Lua
57 lines
1.1 KiB
Lua
--
|
|
-- tests/actions/vstudio/vc200x/test_resource_compiler.lua
|
|
-- Validate generation the VCResourceCompilerTool element in Visual Studio 200x C/C++ projects.
|
|
-- Copyright (c) 2012-2013 Jason Perkins and the Premake project
|
|
--
|
|
|
|
local suite = test.declare("vs200x_resource_compiler")
|
|
local vc200x = premake.vstudio.vc200x
|
|
|
|
|
|
--
|
|
-- Setup/teardown
|
|
--
|
|
|
|
local sln, prj
|
|
|
|
function suite.setup()
|
|
_ACTION = "vs2008"
|
|
sln, prj = test.createsolution()
|
|
end
|
|
|
|
local function prepare()
|
|
local cfg = test.getconfig(prj, "Debug")
|
|
vc200x.VCResourceCompilerTool(cfg)
|
|
end
|
|
|
|
|
|
--
|
|
-- Verify the basic structure of the compiler block with no flags or settings.
|
|
--
|
|
|
|
function suite.looksGood_onDefaultSettings()
|
|
prepare()
|
|
test.capture [[
|
|
<Tool
|
|
Name="VCResourceCompilerTool"
|
|
/>
|
|
]]
|
|
end
|
|
|
|
|
|
--
|
|
-- Both includedirs and resincludedirs should be used.
|
|
--
|
|
|
|
function suite.usesBothIncludeAndResIncludeDirs()
|
|
includedirs { "../include" }
|
|
resincludedirs { "../res/include" }
|
|
prepare()
|
|
test.capture [[
|
|
<Tool
|
|
Name="VCResourceCompilerTool"
|
|
AdditionalIncludeDirectories="..\include;..\res\include"
|
|
/>
|
|
]]
|
|
end
|