---
-- xcode/tests/test_xcode4_workspace.lua
-- Validate generation for Xcode workspaces.
-- Author Mihai Sebea
-- Modified by Jason Perkins
-- Copyright (c) 2014-2015 Jason Perkins and the Premake project
---
local suite = test.declare("xcode4_workspace")
local p = premake
local xcode = p.modules.xcode
--
-- Setup
--
local wks, prj
function suite.setup()
p.action.set('xcode4')
wks = test.createWorkspace()
end
local function prepare()
wks = test.getWorkspace(wks)
xcode.generateWorkspace(wks)
end
--
-- Check the basic structure of a workspace.
--
function suite.onEmptyWorkspace()
wks.projects = {}
prepare()
test.capture [[
]]
end
function suite.onDefaultWorkspace()
prepare()
test.capture [[
]]
end
function suite.onMultipleProjects()
test.createproject(wks)
prepare()
test.capture [[
]]
end
function suite.onMultipleProjectsGrouped()
test.createGroup(wks)
test.createproject(wks)
prepare()
test.capture [[
]]
end
--
-- Projects should include relative path from workspace.
--
function suite.onNestedProjectPath()
location "MyProject"
prepare()
test.capture [[
]]
end
function suite.onExternalProjectPath()
location "../MyProject"
prepare()
test.capture [[
]]
end