--
-- tests/actions/codeblocks/codeblocks_files.lua
-- Validate generation of files block in CodeLite C/C++ projects.
-- Copyright (c) 2011 Jason Perkins and the Premake project
--
T.codeblocks_files = { }
local suite = T.codeblocks_files
local codeblocks = premake.codeblocks
--
-- Setup
--
local sln, prj
function suite.setup()
sln = test.createsolution()
end
local function prepare()
premake.bake.buildconfigs()
prj = premake.solution.getproject(sln, 1)
codeblocks.files(prj)
end
--
-- Test grouping and nesting
--
function suite.SimpleSourceFile()
files { "hello.cpp" }
prepare()
test.capture [[
]]
end
function suite.SingleFolderLevel()
files { "src/hello.cpp" }
prepare()
test.capture [[
]]
end
function suite.MultipleFolderLevels()
files { "src/greetings/hello.cpp" }
prepare()
test.capture [[
]]
end
--
-- Test source file type handling
--
function suite.CFileInCppProject()
files { "hello.c" }
prepare()
test.capture [[
]]
end
function suite.WindowsResourceFile()
files { "hello.rc" }
prepare()
test.capture [[
]]
end
function suite.PchFile()
files { "hello.h" }
pchheader "hello.h"
prepare()
test.capture [[
]]
end