Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJason Perkins <starkos@industriousone.com>2011-12-20 23:59:26 +0400
committerJason Perkins <starkos@industriousone.com>2011-12-20 23:59:26 +0400
commit2322e56d36cee75f4ede346a8e4e12ba152867c1 (patch)
tree34d7f2832574e2ff17160ee578d45894efb7fd3c /tests
parenteeff5330eb40fda0a3a51677045dd9b217834bc1 (diff)
Bug 3410213: regression in xcode generation in 4.4 beta3
Diffstat (limited to 'tests')
-rw-r--r--tests/actions/xcode/test_file_references.lua49
-rw-r--r--tests/premake4.lua1
2 files changed, 50 insertions, 0 deletions
diff --git a/tests/actions/xcode/test_file_references.lua b/tests/actions/xcode/test_file_references.lua
new file mode 100644
index 0000000..5cbd9e7
--- /dev/null
+++ b/tests/actions/xcode/test_file_references.lua
@@ -0,0 +1,49 @@
+--
+-- tests/actions/xcode/test_file_references.lua
+-- Verify generation of PBXFileReference section of Xcode project
+-- Copyright (c) 2011 Jason Perkins and the Premake project
+--
+
+ T.xcode3_filerefs = { }
+ local suite = T.xcode3_filerefs
+ local xcode = premake.xcode
+
+
+--
+-- Setup and teardown
+--
+
+ local sln
+
+ function suite.setup()
+ _ACTION = "xcode3"
+ xcode.used_ids = { } -- reset the list of generated IDs
+ sln = test.createsolution()
+ end
+
+ local function prepare()
+ premake.bake.buildconfigs()
+ xcode.preparesolution(sln)
+ local prj = premake.solution.getproject(sln, 1)
+ tr = xcode.buildprjtree(prj)
+ xcode.PBXFileReference(tr)
+ end
+
+
+--
+-- Bug #3410213: regression in xcode generation in 4.4 beta3
+-- When a location has been set on a project, a file at the top of
+-- the source tree (i.e. not in a folder) should use the relative
+-- path to the project.
+--
+
+ function suite.canFindFile_onLocationSet()
+ location "build"
+ files "hello.c"
+ prepare()
+ test.capture [[
+/* Begin PBXFileReference section */
+ [hello.c] /* hello.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = "hello.c"; path = "../hello.c"; sourceTree = "<group>"; };
+ ]]
+ end
+
diff --git a/tests/premake4.lua b/tests/premake4.lua
index fa86e99..ca4ecff 100644
--- a/tests/premake4.lua
+++ b/tests/premake4.lua
@@ -119,6 +119,7 @@
dofile("actions/make/test_wiidev.lua")
-- Xcode3 tests
+ dofile("actions/xcode/test_file_references.lua")
dofile("actions/xcode/test_xcode_common.lua")
dofile("actions/xcode/test_xcode_project.lua")
dofile("actions/xcode/test_xcode_dependencies.lua")