mame/3rdparty/genie/tests/actions/vstudio/vc2010/test_files.lua
Julian Sikorski ed2b7e5ef1 Synced with GENie upstream revision e78d6c1 (#5631)
* Synced with GENie upstream revision e78d6c1

* Add Visual Studio 2019 support

* Fix hardcoded -m64

* Switch appveyor to Visual Studio 2019

* Fix genie being built as 32-bit

* MSVC build is known to be broken currently. Let it fail until all the known issues are fixed.

* Update the packages before building

* Build with 3 threads
Appveyor VMs have only 2 cores and 8 GB RAM.

* Enable caching of pacman cache
2019-09-29 09:30:18 -04:00

104 lines
1.7 KiB
Lua

--
-- tests/actions/vstudio/vc2010/test_files.lua
-- Validate generation of files block in Visual Studio 2010 C/C++ projects.
-- Copyright (c) 2011 Jason Perkins and the Premake project
--
T.vstudio_vs2010_files = { }
local suite = T.vstudio_vs2010_files
local vc2010 = premake.vstudio.vc2010
--
-- Setup
--
local sln, prj
function suite.setup()
sln = test.createsolution()
end
local function prepare()
premake.bake.buildconfigs()
prj = premake.solution.getproject(sln, 1)
sln.vstudio_configs = premake.vstudio.buildconfigs(sln)
vc2010.files(prj)
end
--
-- Test file groups
--
function suite.SimpleHeaderFile()
files { "include/hello.h" }
prepare()
test.capture [[
<ItemGroup>
<ClInclude Include="include\hello.h" />
</ItemGroup>
]]
end
function suite.SimpleSourceFile()
files { "hello.c" }
prepare()
test.capture [[
<ItemGroup>
<ClCompile Include="hello.c">
</ClCompile>
</ItemGroup>
]]
end
function suite.SimpleObjectFile()
files { "hello.obj" }
prepare()
test.capture [[
<ItemGroup>
<Object Include="hello.obj" />
</ItemGroup>
]]
end
function suite.SimpleNoneFile()
files { "docs/hello.txt" }
prepare()
test.capture [[
<ItemGroup>
<None Include="docs\hello.txt" />
</ItemGroup>
]]
end
function suite.SimpleResourceFile()
files { "resources/hello.rc" }
prepare()
test.capture [[
<ItemGroup>
<ResourceCompile Include="resources\hello.rc" />
</ItemGroup>
]]
end
--
-- Test path handling
--
function suite.MultipleFolderLevels()
files { "src/greetings/hello.c" }
prepare()
test.capture [[
<ItemGroup>
<ClCompile Include="src\greetings\hello.c">
</ClCompile>
</ItemGroup>
]]
end