-- -- tests/actions/test_vs2005_csproj.lua -- Automated test suite for Visual Studio 2005-2008 C# project generation. -- Copyright (c) 2010 Jason Perkins and the Premake project -- T.vs2005_csproj = { } local suite = T.vs2005_csproj local cs2005 = premake.vstudio.cs2005 -- -- Configure a solution for testing -- local sln, prj function suite.setup() _ACTION = "vs2005" sln = solution "MySolution" configurations { "Debug", "Release" } platforms {} project "MyProject" language "C#" kind "ConsoleApp" uuid "AE61726D-187C-E440-BD07-2556188A6565" end local function prepare() io.capture() premake.buildconfigs() prj = premake.solution.getproject(sln, 1) end -- -- Project element tests -- function suite.projectelement_OnVs2005() _ACTION = "vs2005" prepare() cs2005.projectelement(prj) test.capture [[ ]] end function suite.projectelement_OnVs2008() _ACTION = "vs2008" prepare() cs2005.projectelement(prj) test.capture [[ ]] end -- -- Project settings tests -- function suite.projectsettings_OnVs2005() _ACTION = "vs2005" prepare() cs2005.projectsettings(prj) test.capture [[ Debug AnyCPU 8.0.50727 2.0 {AE61726D-187C-E440-BD07-2556188A6565} Exe Properties MyProject MyProject ]] end function suite.projectsettings_OnVs2008() _ACTION = "vs2008" prepare() cs2005.projectsettings(prj) test.capture [[ Debug AnyCPU 9.0.21022 2.0 {AE61726D-187C-E440-BD07-2556188A6565} Exe Properties MyProject MyProject ]] end function suite.projectsettings_OnFrameworkVersion() _ACTION = "vs2005" framework "3.0" prepare() cs2005.projectsettings(prj) test.capture [[ Debug AnyCPU 8.0.50727 2.0 {AE61726D-187C-E440-BD07-2556188A6565} Exe Properties MyProject MyProject v3.0 ]] end