-- -- tests/actions/vstudio/vc2010/test_nmake_props.lua -- Check makefile project generation. -- Copyright (c) 2013 Jason Perkins and the Premake project -- local suite = test.declare("vs2010_nmake_props") local vc2010 = premake.vstudio.vc2010 -- -- Setup -- local sln, prj function suite.setup() _ACTION = "vs2010" sln, prj = test.createsolution() kind "Makefile" end local function prepare() local cfg = test.getconfig(prj, "Debug") vc2010.nmakeProperties(cfg) end -- -- Check the structure with the default project values. -- function suite.structureIsCorrect_onDefaultValues() prepare() test.capture [[ $(OutDir)MyProject ]] end -- -- Element should be skipped for non-Makefile projects. -- function suite.skips_onNonMakefile() kind "ConsoleApp" prepare() test.isemptycapture() end -- -- Make sure the target file extension is included. -- function suite.usesTargetExtension() targetextension ".exe" prepare() test.capture [[ $(OutDir)MyProject.exe ]] end -- -- Verify generation of the build commands. -- function suite.buildCommandLine_onSingleCommand() buildcommands { "command 1" } prepare() test.capture [[ $(OutDir)MyProject command 1 ]] end function suite.buildCommandLine_onMultipleCommands() buildcommands { "command 1", "command 2" } prepare() test.capture [[ $(OutDir)MyProject command 1 command 2 ]] end function suite.rebuildCommandLine() rebuildcommands { "command 1" } prepare() test.capture [[ $(OutDir)MyProject command 1 ]] end function suite.cleanCommandLine() cleancommands { "command 1" } prepare() test.capture [[ $(OutDir)MyProject command 1 ]] end