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:
authorOliver Schneider <oliver@assarbad.net>2022-02-27 04:07:42 +0300
committerOliver Schneider <oliver@assarbad.net>2022-02-27 04:07:42 +0300
commitec945dcfb3116421ba196476355c364f1405617d (patch)
tree088f9e6f670bf3c8289147b4571fef053ae2a715 /tests
parent68abe9eb99e5d8aec6a5dacfd8859a5bb01dce0b (diff)
Trying to align output better with vanilla VS output4.4-wds-877
Added tests for some VS versions that weren't currently tested --HG-- branch : WDS-build
Diffstat (limited to 'tests')
-rw-r--r--tests/actions/vstudio/cs2005/buildevents.lua53
-rw-r--r--tests/actions/vstudio/vc200x/header.lua21
-rw-r--r--tests/premake4.lua1
3 files changed, 75 insertions, 0 deletions
diff --git a/tests/actions/vstudio/cs2005/buildevents.lua b/tests/actions/vstudio/cs2005/buildevents.lua
new file mode 100644
index 0000000..213de1b
--- /dev/null
+++ b/tests/actions/vstudio/cs2005/buildevents.lua
@@ -0,0 +1,53 @@
+--
+-- tests/actions/vstudio/cs2005/buildevents.lua
+-- Validate the build events in Visual Studio 2005+ .csproj
+-- Copyright (c) 2009-2014 Jason Perkins and the Premake project
+--
+
+ T.vstudio_cs2005_buildevents = { }
+ local suite = T.vstudio_cs2005_buildevents
+ local cs2005 = premake.vstudio.cs2005
+
+--
+-- Setup
+--
+
+ local sln, prj
+
+ function suite.setup()
+ sln = test.createsolution()
+ end
+
+ local function prepare()
+ premake.bake.buildconfigs()
+ prj = premake.solution.getproject(sln, 1)
+ cs2005.buildevents(prj)
+ end
+
+--
+-- Prebuild events
+--
+
+ function suite.prebuildEvents()
+ prebuildcommands { "pre" }
+ prepare()
+ test.capture [[
+ <PropertyGroup>
+ <PreBuildEvent>pre</PreBuildEvent>
+ </PropertyGroup>
+ ]]
+ end
+
+--
+-- Postbuild events
+--
+
+ function suite.postbuildEvents()
+ postbuildcommands { "post" }
+ prepare()
+ test.capture [[
+ <PropertyGroup>
+ <PostBuildEvent>post</PostBuildEvent>
+ </PropertyGroup>
+ ]]
+ end
diff --git a/tests/actions/vstudio/vc200x/header.lua b/tests/actions/vstudio/vc200x/header.lua
index 18670ec..cde6570 100644
--- a/tests/actions/vstudio/vc200x/header.lua
+++ b/tests/actions/vstudio/vc200x/header.lua
@@ -42,6 +42,27 @@
]]
end
+ function suite.On2003()
+ _ACTION = 'vs2003'
+ prepare()
+ test.capture [[
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="7.10"
+ ]]
+ end
+
+ function suite.On2005()
+ _ACTION = 'vs2005'
+ prepare()
+ test.capture [[
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="8.00"
+ ]]
+ end
function suite.On2008()
_ACTION = 'vs2008'
diff --git a/tests/premake4.lua b/tests/premake4.lua
index b0ebde9..6c149e3 100644
--- a/tests/premake4.lua
+++ b/tests/premake4.lua
@@ -86,6 +86,7 @@
dofile("actions/vstudio/cs2005/projectelement.lua")
dofile("actions/vstudio/cs2005/projectsettings.lua")
dofile("actions/vstudio/cs2005/propertygroup.lua")
+ dofile("actions/vstudio/cs2005/buildevents.lua")
-- Visual Studio 2005-2010 solutions
dofile("actions/vstudio/sln2005/dependencies.lua")