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-19 16:58:12 +0400
committerJason Perkins <starkos@industriousone.com>2011-08-19 16:58:12 +0400
commit74706ad18dd4346f6bb52455ea89245e8e66346b (patch)
treeaa77cbe087f825055f4b55c248edc2760351d96e /tests
parente00181b5b1420b5c1011459d23f5ea76d8f3791a (diff)
Added virtual path support for CodeBlocks
Diffstat (limited to 'tests')
-rwxr-xr-xtests/actions/codeblocks/test_filters.lua42
-rw-r--r--tests/premake4.lua1
2 files changed, 43 insertions, 0 deletions
diff --git a/tests/actions/codeblocks/test_filters.lua b/tests/actions/codeblocks/test_filters.lua
new file mode 100755
index 0000000..1f454b8
--- /dev/null
+++ b/tests/actions/codeblocks/test_filters.lua
@@ -0,0 +1,42 @@
+--
+-- tests/actions/codeblocks/test_filters.lua
+-- Test CodeBlocks virtual path support.
+-- Copyright (c) 2011 Jason Perkins and the Premake project
+--
+
+ T.codeblocks_filters = { }
+ local suite = T.codeblocks_filters
+ 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
+
+
+--
+-- File/filter assignment tests
+--
+
+ function suite.Filter_UsesVirtualForm_OnVpath()
+ files { "src/hello.cpp" }
+ vpaths { ["Source Files"] = "**.c" }
+ prepare()
+ test.capture [[
+ <Unit filename="src/hello.cpp">
+ <Option virtualFolder="Source Files" />
+ </Unit>
+ ]]
+ end
diff --git a/tests/premake4.lua b/tests/premake4.lua
index 326d080..00ce43f 100644
--- a/tests/premake4.lua
+++ b/tests/premake4.lua
@@ -126,6 +126,7 @@
-- CodeBlocks tests
dofile("actions/codeblocks/codeblocks_files.lua")
+ dofile("actions/codeblocks/test_filters.lua")
--
-- Register a test action