---
-- 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()
_ACTION = "xcode4"
wks = test.createWorkspace()
end
local function prepare()
wks = test.getWorkspace(wks)
xcode.generateWorkspace(wks)
-- Check the basic structure of a workspace.
function suite.onEmptyWorkspace()
wks.projects = {}
prepare()
test.capture [[
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
</Workspace>
]]
function suite.onDefaultWorkspace()
<FileRef
location = "group:MyProject.xcodeproj">
</FileRef>
function suite.onMultipleProjects()
test.createproject(wks)
location = "group:MyProject2.xcodeproj">
-- Projects should include relative path from workspace.
function suite.onNestedProjectPath()
location "MyProject"
location = "group:MyProject/MyProject.xcodeproj">
function suite.onExternalProjectPath()
location "../MyProject"
location = "group:../MyProject/MyProject.xcodeproj">