This repository has been archived on 2022-12-23. You can view files and clone it, but cannot push or open issues or pull requests.
fuck-premake-old2/tests/actions/vstudio/cs2005/test_icon.lua

50 lines
835 B
Lua

--
-- tests/actions/vstudio/cs2005/test_icon.lua
-- Validate generation of the application icon declaration.
-- Copyright (c) 2013 Jason Perkins and the Premake project
--
local suite = test.declare("vstudio_cs2005_icon")
local cs2005 = premake.vstudio.cs2005
--
-- Setup
--
local sln
function suite.setup()
sln, prj = test.createsolution()
end
local function prepare()
prj = premake.solution.getproject_ng(sln, 1)
cs2005.applicationIcon(prj)
end
--
-- By default, there should be no output.
--
function suite.noOutput_onNoIcon()
prepare()
test.isemptycapture()
end
--
-- If an icon is specified, output the property group.
--
function suite.doesOutput_onIcon()
icon "MyApp.ico"
prepare()
test.capture [[
<PropertyGroup>
<ApplicationIcon>MyApp.ico</ApplicationIcon>
</PropertyGroup>
]]
end