This repository has been archived on 2022-12-23. You can view files and clone it, but cannot push or open issues or pull requests.
fuck-premake-old2/tests/actions/vstudio/vc2010/test_build_log.lua
2015-08-28 16:16:14 -04:00

51 lines
853 B
Lua

---
-- tests/actions/vstudio/vc2010/test_build_log.lua
-- Validate build log settings in Visual Studio 2010 C/C++ projects.
-- Copyright (c) 2015 Jason Perkins and the Premake project
---
local suite = test.declare("vstudio_vs2010_build_log")
local vc2010 = premake.vstudio.vc2010
--
-- Setup
--
local wks, prj
function suite.setup()
wks, prj = test.createWorkspace()
end
local function prepare(platform)
local cfg = test.getconfig(prj, "Debug", platform)
vc2010.buildLog(cfg)
end
--
-- Nothing should be written by default.
--
function suite.isIgnoredByDefault()
prepare()
test.isemptycapture()
end
--
-- Write out relative path if provided.
--
function suite.writesPathIfSet()
buildlog "logs/MyCustomLogFile.log"
prepare()
test.capture [[
<BuildLog>
<Path>logs\MyCustomLogFile.log</Path>
</BuildLog>
]]
end