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

github.com/windirstat/premake-4.x-stable.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-08-10 00:11:35 +0400
committerJason Perkins <starkos@industriousone.com>2011-08-10 00:11:35 +0400
commit022012e49cd9e1df562a17b2c2134dccb1457f05 (patch)
treece91b5eaf1308aaaed6f82ebf3e05b1a5d6d0f85 /tests
parentb6f686e3b39b31a647bfe4f32fd6bd878d32f789 (diff)
Added vpath support to VC200x and Codelite
Diffstat (limited to 'tests')
-rw-r--r--tests/actions/vstudio/vc200x/test_filters.lua63
-rw-r--r--tests/premake4.lua1
2 files changed, 64 insertions, 0 deletions
diff --git a/tests/actions/vstudio/vc200x/test_filters.lua b/tests/actions/vstudio/vc200x/test_filters.lua
new file mode 100644
index 0000000..0d057ef
--- /dev/null
+++ b/tests/actions/vstudio/vc200x/test_filters.lua
@@ -0,0 +1,63 @@
+--
+-- tests/actions/vstudio/vc200x/test_filters.lua
+-- Validate generation of filter blocks in Visual Studio 200x C/C++ projects.
+-- Copyright (c) 2011 Jason Perkins and the Premake project
+--
+
+T.vs200x_filters = { }
+local suite = T.vs200x_filters
+local vc200x = premake.vstudio.vc200x
+
+
+--
+-- Setup/teardown
+--
+
+ local sln, prj
+ local os_uuid
+
+ function suite.setup()
+ os_uuid = os.uuid
+ os.uuid = function() return "00112233-4455-6677-8888-99AABBCCDDEE" end
+
+ _ACTION = "vs2008"
+ sln, prj = test.createsolution()
+ end
+
+ function suite.teardown()
+ os.uuid = os_uuid
+ end
+
+ local function prepare()
+ premake.bake.buildconfigs()
+ sln.vstudio_configs = premake.vstudio.buildconfigs(sln)
+ prj = premake.solution.getproject(sln,1)
+ end
+
+
+--
+-- File/filter assignment tests
+--
+
+ function suite.Filter_UsesVirtualForm_OnVpath()
+ files { "src/hello.c" }
+ vpaths { ["Source Files"] = "**.c" }
+ prepare()
+ vc200x.Files(prj)
+ test.capture [[
+ <Filter
+ Name="Source Files"
+ Filter=""
+ >
+ <File
+ RelativePath="src\hello.c"
+ >
+ </File>
+ </Filter>
+ ]]
+ end
+
+
+-- TODO: should be NO filter, with uuid
+-- can I tell if this is a virtual folder by munging the path?
+-- can I build that feature into the source tree? \ No newline at end of file
diff --git a/tests/premake4.lua b/tests/premake4.lua
index 8f4620c..326d080 100644
--- a/tests/premake4.lua
+++ b/tests/premake4.lua
@@ -99,6 +99,7 @@
dofile("actions/vstudio/vc200x/debugdir.lua")
dofile("actions/vstudio/vc200x/header.lua")
dofile("actions/vstudio/vc200x/files.lua")
+ dofile("actions/vstudio/vc200x/test_filters.lua")
-- Visual Studio 2010 C/C++ projects
dofile("actions/vstudio/vc2010/test_debugdir.lua")