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>2017-03-16 01:44:43 +0300
committerOliver Schneider <oliver@assarbad.net>2017-03-16 01:44:43 +0300
commit254f662b5f6713ec9d757deac116e7ccc8a422d8 (patch)
tree2b782c7fb445641b63562487e8d32a2a42ffbf31 /tests
parente6b972d4069fe63d66e59a94a789df1924e9215f (diff)
Adding support for Visual Studio 2017 projects and solutions.
Does not add the VisualStudioVersion and MinimumVisualStudioVersion in solution files, but VS2017 opens those fine regardless and picks them up first even when VS2010, 2012, 2013 and VS2017 are installed as well. Added corresponding tests and verified that all is as expected. --HG-- branch : vs2017_support
Diffstat (limited to 'tests')
-rw-r--r--tests/actions/vstudio/cs2005/buildevents.lua53
-rwxr-xr-xtests/actions/vstudio/sln2005/header.lua29
-rw-r--r--tests/actions/vstudio/vc2010/test_config_props.lua13
-rw-r--r--tests/premake4.lua1
-rw-r--r--tests/testfx.lua2
5 files changed, 41 insertions, 57 deletions
diff --git a/tests/actions/vstudio/cs2005/buildevents.lua b/tests/actions/vstudio/cs2005/buildevents.lua
deleted file mode 100644
index 213de1b..0000000
--- a/tests/actions/vstudio/cs2005/buildevents.lua
+++ /dev/null
@@ -1,53 +0,0 @@
---
--- 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/sln2005/header.lua b/tests/actions/vstudio/sln2005/header.lua
index a959677..2208b42 100755
--- a/tests/actions/vstudio/sln2005/header.lua
+++ b/tests/actions/vstudio/sln2005/header.lua
@@ -76,6 +76,14 @@ Microsoft Visual Studio Solution File, Format Version 12.00
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
]]
+--[[
+VS 2013 seems to add:
+
+VisualStudioVersion = 12.0.31101.0
+MinimumVisualStudioVersion = 10.0.40219.1
+
+which don't seem to be mandatory, though.
+]]
end
function suite.On2015()
@@ -83,10 +91,10 @@ Microsoft Visual Studio Solution File, Format Version 12.00
prepare()
test.capture [[
Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio 2015
+# Visual Studio 14
]]
--[[
-VS2015 seems to add:
+VS 2015 seems to add:
VisualStudioVersion = 14.0.23107.0
MinimumVisualStudioVersion = 10.0.40219.1
@@ -94,3 +102,20 @@ MinimumVisualStudioVersion = 10.0.40219.1
which don't seem to be mandatory, though.
]]
end
+
+ function suite.On2017()
+ _ACTION = "vs2017"
+ prepare()
+ test.capture [[
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+ ]]
+--[[
+VS 2017 seems to add:
+
+VisualStudioVersion = 15.0.26228.4
+MinimumVisualStudioVersion = 10.0.40219.1
+
+which don't seem to be mandatory, though.
+]]
+ end
diff --git a/tests/actions/vstudio/vc2010/test_config_props.lua b/tests/actions/vstudio/vc2010/test_config_props.lua
index 2970ad4..d2f18dd 100644
--- a/tests/actions/vstudio/vc2010/test_config_props.lua
+++ b/tests/actions/vstudio/vc2010/test_config_props.lua
@@ -89,3 +89,16 @@
</PropertyGroup>
]]
end
+
+ function suite.structureIsCorrect_onDefaultValues_on2017()
+ _ACTION = "vs2017"
+ prepare()
+ test.capture [[
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <CharacterSet>MultiByte</CharacterSet>
+ <PlatformToolset>v141</PlatformToolset>
+ </PropertyGroup>
+ ]]
+ end
diff --git a/tests/premake4.lua b/tests/premake4.lua
index 6c149e3..b0ebde9 100644
--- a/tests/premake4.lua
+++ b/tests/premake4.lua
@@ -86,7 +86,6 @@
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")
diff --git a/tests/testfx.lua b/tests/testfx.lua
index 8342086..5a0f33b 100644
--- a/tests/testfx.lua
+++ b/tests/testfx.lua
@@ -23,7 +23,7 @@
function test.string_does_not_contain(buffer, expected)
if string.find(buffer,expected) then
- test.fail("\n==Fail==: Did not expected to find :\n%s\nyet it was found in buffer:\n%s\n", expected,buffer)
+ test.fail("\n==Fail==: Did not expect to find :\n%s\nyet it was found in buffer:\n%s\n", expected,buffer)
end
end