From de7b6e001d7bd2034a29bc675ad06dc9ee5a648f Mon Sep 17 00:00:00 2001 From: Jason Perkins Date: Thu, 9 Jul 2015 15:13:11 -0400 Subject: [PATCH] Code cleanup; finish converting to new indentation-aware output APIs --- src/actions/vstudio/vs2010_vcxproj.lua | 193 +++++++------- .../vstudio/vc2010/test_assembly_refs.lua | 24 +- .../vstudio/vc2010/test_build_events.lua | 40 +-- .../vstudio/vc2010/test_config_props.lua | 156 +++++------ .../vstudio/vc2010/test_excluded_configs.lua | 28 +- tests/actions/vstudio/vc2010/test_globals.lua | 104 ++++---- .../vstudio/vc2010/test_imagexex_settings.lua | 22 +- tests/actions/vstudio/vc2010/test_link.lua | 246 +++++++++--------- .../vstudio/vc2010/test_nmake_props.lua | 44 ++-- .../vstudio/vc2010/test_output_props.lua | 170 ++++++------ .../vstudio/vc2010/test_project_configs.lua | 76 +++--- .../vstudio/vc2010/test_prop_sheet.lua | 6 +- 12 files changed, 551 insertions(+), 558 deletions(-) diff --git a/src/actions/vstudio/vs2010_vcxproj.lua b/src/actions/vstudio/vs2010_vcxproj.lua index f4ea3c1a..5ad52484 100644 --- a/src/actions/vstudio/vs2010_vcxproj.lua +++ b/src/actions/vstudio/vs2010_vcxproj.lua @@ -83,20 +83,20 @@ end local configs = {} - _p(1,'') + p.push('') for cfg in project.eachconfig(prj) do for _, arch in ipairs(platforms) do local prjcfg = vstudio.projectConfig(cfg, arch) if not configs[prjcfg] then configs[prjcfg] = prjcfg - _x(2,'', vstudio.projectConfig(cfg, arch)) - _x(3,'%s', vstudio.projectPlatform(cfg)) - _p(3,'%s', arch) - _p(2,'') + p.push('', vstudio.projectConfig(cfg, arch)) + p.x('%s', vstudio.projectPlatform(cfg)) + p.w('%s', arch) + p.pop('') end end end - _p(1,'') + p.pop('') end @@ -109,7 +109,7 @@ local tools = string.format(' ToolsVersion="%s"', action.vstudio.toolsVersion) local framework = prj.framework or action.vstudio.targetFramework or "4.0" - _p(2,'v%s', framework) + p.w('v%s', framework) end @@ -130,7 +130,7 @@ function m.globals(prj) m.propertyGroup(nil, "Globals") p.callArray(m.elements.globals, prj) - _p(1,'') + p.pop('') end @@ -162,7 +162,7 @@ function m.configurationProperties(cfg) m.propertyGroup(cfg, "Configuration") p.callArray(m.elements.configurationProperties, cfg) - _p(1,'') + p.pop('') end function m.configurationPropertiesGroup(prj) @@ -208,7 +208,7 @@ if not vstudio.isMakefile(cfg) then m.propertyGroup(cfg) p.callArray(m.elements.outputProperties, cfg) - _p(1,'') + p.pop('') end end @@ -233,7 +233,7 @@ m.nmakeCommandLine(cfg, cfg.buildcommands, "Build") m.nmakeCommandLine(cfg, cfg.rebuildcommands, "ReBuild") m.nmakeCommandLine(cfg, cfg.cleancommands, "Clean") - _p(1,'') + p.pop('') end end @@ -428,8 +428,7 @@ m.additionalLinkOptions, } else - return { - } + return {} end end @@ -453,27 +452,21 @@ -- function m.manifest(cfg) - -- no additional manifests in static lib - if cfg.kind == premake.STATICLIB then - return - end + if cfg.kind ~= p.STATICLIB then + -- get the manifests files + local manifests = {} + for _, fname in ipairs(cfg.files) do + if path.getextension(fname) == ".manifest" then + table.insert(manifests, project.getrelative(cfg.project, fname)) + end + end - -- get the manifests files - local manifests = {} - for _, fname in ipairs(cfg.files) do - if path.getextension(fname) == ".manifest" then - table.insert(manifests, project.getrelative(cfg.project, fname)) + if #manifests > 0 then + p.push('') + m.element("AdditionalManifestFiles", nil, "%s %%(AdditionalManifestFiles)", table.concat(manifests, " ")) + p.pop('') end end - - -- when a project is not using manifest files, visual studio doesn't write the section. - if #manifests == 0 then - return - end - - p.push('') - m.element("AdditionalManifestFiles", nil, "%s %%(AdditionalManifestFiles)", table.concat(manifests, " ")) - p.pop('') end @@ -491,12 +484,12 @@ if #steps > 0 then steps = os.translateCommands(steps, p.WINDOWS) - _p(2,'<%s>', name) - _x(3,'%s', table.implode(steps, "", "", "\r\n")) + p.push('<%s>', name) + p.x('%s', table.implode(steps, "", "", "\r\n")) if msg then - _x(3,'%s', msg) + p.x('%s', msg) end - _p(2,'', name) + p.pop('', name) end end @@ -555,21 +548,21 @@ local refs = config.getlinks(cfg, "system", "fullpath", "managed") if #refs > 0 then - _p(1,'') + p.push('') for i = 1, #refs do local value = refs[i] -- If the link contains a '/' then it is a relative path to -- a local assembly. Otherwise treat it as a system assembly. if value:find('/', 1, true) then - _x(2,'', path.getbasename(value)) - _x(3,'%s', path.translate(value)) - _p(2,'') + p.push('', path.getbasename(value)) + p.x('%s', path.translate(value)) + p.pop('') else - _x(2,'', path.getbasename(value)) + p.x('', path.getbasename(value)) end end - _p(1,'') + p.pop('') end end @@ -929,7 +922,7 @@ function m.additionalLibraryDirectories(cfg) if #cfg.libdirs > 0 then local dirs = table.concat(vstudio.path(cfg, cfg.libdirs), ";") - _x(3,'%s;%%(AdditionalLibraryDirectories)', dirs) + p.x('%s;%%(AdditionalLibraryDirectories)', dirs) end end @@ -953,7 +946,7 @@ function m.additionalLinkOptions(cfg) if #cfg.linkoptions > 0 then local opts = table.concat(cfg.linkoptions, " ") - _x(3, '%s %%(AdditionalOptions)', opts) + p.x('%s %%(AdditionalOptions)', opts) end end @@ -1005,14 +998,14 @@ function m.characterSet(cfg) if not vstudio.isMakefile(cfg) then - _p(2,'%s', iif(cfg.flags.Unicode, "Unicode", "MultiByte")) + p.w('%s', iif(cfg.flags.Unicode, "Unicode", "MultiByte")) end end function m.wholeProgramOptimization(cfg) if cfg.flags.LinkTimeOptimization then - _p(2,'true') + p.w('true') end end @@ -1050,7 +1043,7 @@ function m.compileAs(cfg) if cfg.project.language == "C" then - _p(3,'CompileAsC') + p.w('CompileAsC') end end @@ -1065,7 +1058,7 @@ None = "Makefile", Utility = "Utility", } - _p(2,'%s', types[cfg.kind]) + p.w('%s', types[cfg.kind]) end @@ -1100,11 +1093,11 @@ function m.deploy(cfg) if cfg.system == premake.XBOX360 then - _p(2,'') - _p(3,'CopyToHardDrive') - _p(3,'ZeroSeekTimes') - _p(3,'$(RemoteRoot)=$(ImagePath);') - _p(2,'') + p.push('') + p.w('CopyToHardDrive') + p.w('ZeroSeekTimes') + p.w('$(RemoteRoot)=$(ImagePath);') + p.pop('') end end @@ -1135,7 +1128,7 @@ cfg.clr == p.OFF and cfg.system ~= premake.XBOX360 then - _p(3,'mainCRTStartup') + p.w('mainCRTStartup') end end @@ -1212,20 +1205,20 @@ function m.generateDebugInformation(cfg) - _p(3,'%s', tostring(cfg.flags.Symbols ~= nil)) + p.w('%s', tostring(cfg.flags.Symbols ~= nil)) end function m.generateManifest(cfg) if cfg.flags.NoManifest then - _p(2,'false') + p.w('false') end end function m.generateMapFile(cfg) if cfg.flags.Maps then - _p(3,'true') + p.w('true') end end @@ -1244,30 +1237,30 @@ function m.ignoreImportLibrary(cfg) if cfg.kind == premake.SHAREDLIB and cfg.flags.NoImportLib then - _p(2,'true'); + p.w('true'); end end function m.imageXex(cfg) if cfg.system == premake.XBOX360 then - _p(2,'') + p.push('') if cfg.configfile then - _p(3,'%s', cfg.configfile) + p.w('%s', cfg.configfile) else - _p(3,'') - _p(3,'') + p.w('') + p.w('') end - _p(3,'') - _p(3,'') - _p(2,'') + p.w('') + p.w('') + p.pop('') end end function m.imageXexOutput(cfg) if cfg.system == premake.XBOX360 then - _x(2,'$(OutDir)$(TargetName).xex') + p.x('$(OutDir)$(TargetName).xex') end end @@ -1288,7 +1281,7 @@ function m.importDefaultProps(prj) - _p(1,'') + p.w('') end @@ -1310,7 +1303,7 @@ function m.importLibrary(cfg) if cfg.kind == premake.SHAREDLIB then - _x(3,'%s', path.translate(cfg.linktarget.relpath)) + p.x('%s', path.translate(cfg.linktarget.relpath)) end end @@ -1325,7 +1318,7 @@ function m.intDir(cfg) local objdir = vstudio.path(cfg, cfg.objdir) - _x(2,'%s\\', objdir) + p.x('%s\\', objdir) end @@ -1354,15 +1347,15 @@ if isWin then if isMakefile then - _p(2,'MakeFileProj') + p.w('MakeFileProj') else if isManaged then m.targetFramework(prj) - _p(2,'ManagedCProj') + p.w('ManagedCProj') else - _p(2,'Win32Proj') + p.w('Win32Proj') end - _p(2,'%s', prj.name) + p.w('%s', prj.name) end end end @@ -1379,7 +1372,7 @@ function m.linkIncremental(cfg) if cfg.kind ~= premake.STATICLIB then - _p(2,'%s', tostring(config.canLinkIncremental(cfg))) + p.w('%s', tostring(config.canLinkIncremental(cfg))) end end @@ -1389,9 +1382,9 @@ -- that has been excluded from the build. As a workaround, disable dependency -- linking and list all siblings explicitly if explicit then - _p(2,'') - _p(3,'false') - _p(2,'') + p.push('') + p.w('false') + p.pop('') end end @@ -1410,7 +1403,7 @@ function m.moduleDefinitionFile(cfg) local df = config.findfile(cfg, ".def") if df then - _p(3,'%s', df) + p.w('%s', df) end end @@ -1426,7 +1419,7 @@ if #commands > 0 then commands = os.translateCommands(commands, p.WINDOWS) commands = table.concat(premake.esc(commands), p.eol()) - _p(2, '%s', phase, commands, phase) + p.w('%s', phase, commands, phase) end end @@ -1439,7 +1432,7 @@ end function m.nmakeOutput(cfg) - _p(2,'$(OutDir)%s', cfg.buildtarget.name) + p.w('$(OutDir)%s', cfg.buildtarget.name) end @@ -1469,8 +1462,8 @@ function m.optimizeReferences(cfg) if config.isOptimizedBuild(cfg) then - _p(3,'true') - _p(3,'true') + p.w('true') + p.w('true') end end @@ -1486,13 +1479,13 @@ function m.outDir(cfg) local outdir = vstudio.path(cfg, cfg.buildtarget.directory) - _x(2,'%s\\', outdir) + p.x('%s\\', outdir) end function m.outputFile(cfg) if cfg.system == premake.XBOX360 then - _p(2,'$(OutDir)%s', cfg.buildtarget.name) + p.w('$(OutDir)%s', cfg.buildtarget.name) end end @@ -1500,7 +1493,7 @@ function m.executablePath(cfg) local dirs = vstudio.path(cfg, cfg.bindirs) if #dirs > 0 then - _x(2,'%s;$(ExecutablePath)', path.translate(table.concat(dirs, ";"))) + p.x('%s;$(ExecutablePath)', path.translate(table.concat(dirs, ";"))) end end @@ -1574,13 +1567,13 @@ function m.projectGuid(prj) - _p(2,'{%s}', prj.uuid) + p.w('{%s}', prj.uuid) end function m.projectName(prj) if prj.name ~= prj.filename then - _x(2,'%s', prj.name) + p.x('%s', prj.name) end end @@ -1595,15 +1588,15 @@ label = string.format(' Label="%s"', label) end - _p(1,'', cond or "", label or "") + p.push('', cond or "", label or "") end function m.propertySheets(cfg) - _p(1,'', m.condition(cfg)) - _p(2,'') - _p(1,'') + p.push('', m.condition(cfg)) + p.w('') + p.pop('') end @@ -1695,7 +1688,7 @@ function m.subSystem(cfg) if cfg.system ~= premake.XBOX360 then local subsystem = iif(cfg.kind == premake.CONSOLEAPP, "Console", "Windows") - _p(3,'%s', subsystem) + p.w('%s', subsystem) end end @@ -1703,23 +1696,23 @@ function m.targetExt(cfg) local ext = cfg.buildtarget.extension if ext ~= "" then - _x(2,'%s', ext) + p.x('%s', ext) else - _p(2,'') - _p(2,'') + p.w('') + p.w('') end end function m.targetName(cfg) - _x(2,'%s%s', cfg.buildtarget.prefix, cfg.buildtarget.basename) + p.x('%s%s', cfg.buildtarget.prefix, cfg.buildtarget.basename) end function m.treatLinkerWarningAsErrors(cfg) if cfg.flags.FatalLinkWarnings then local el = iif(cfg.kind == premake.STATICLIB, "Lib", "Linker") - _p(3,'true', el, el) + p.w('true', el, el) end end @@ -1760,26 +1753,26 @@ function m.useDebugLibraries(cfg) local runtime = config.getruntime(cfg) - _p(2,'%s', tostring(runtime:endswith("Debug"))) + p.w('%s', tostring(runtime:endswith("Debug"))) end function m.useOfMfc(cfg) if cfg.flags.MFC then - _p(2,'%s', iif(cfg.flags.StaticRuntime, "Static", "Dynamic")) + p.w('%s', iif(cfg.flags.StaticRuntime, "Static", "Dynamic")) end end function m.useOfAtl(cfg) if cfg.atl then - _p(2,'%s', cfg.atl) + p.w('%s', cfg.atl) end end function m.userMacros(cfg) - _p(1,'') + p.w('') end diff --git a/tests/actions/vstudio/vc2010/test_assembly_refs.lua b/tests/actions/vstudio/vc2010/test_assembly_refs.lua index a344a77b..2ed36a13 100644 --- a/tests/actions/vstudio/vc2010/test_assembly_refs.lua +++ b/tests/actions/vstudio/vc2010/test_assembly_refs.lua @@ -44,10 +44,10 @@ links { "System.dll", "System.Data.dll" } prepare() test.capture [[ - - - - + + + + ]] end @@ -60,9 +60,9 @@ links { "m", "System.dll" } prepare() test.capture [[ - - - + + + ]] end @@ -75,10 +75,10 @@ links { "../nunit.framework.dll" } prepare() test.capture [[ - - - ..\nunit.framework.dll - - + + + ..\nunit.framework.dll + + ]] end diff --git a/tests/actions/vstudio/vc2010/test_build_events.lua b/tests/actions/vstudio/vc2010/test_build_events.lua index 6d9964c6..fb829554 100644 --- a/tests/actions/vstudio/vc2010/test_build_events.lua +++ b/tests/actions/vstudio/vc2010/test_build_events.lua @@ -43,9 +43,9 @@ prebuildcommands { "command1" } prepare() test.capture [[ - - command1 - + + command1 + ]] end @@ -53,9 +53,9 @@ postbuildcommands { "command1" } prepare() test.capture [[ - - command1 - + + command1 + ]] end @@ -64,12 +64,12 @@ postbuildcommands { "command2" } prepare() test.capture [[ - - command1 - - - command2 - + + command1 + + + command2 + ]] end @@ -81,7 +81,7 @@ function suite.splits_onMultipleCommands() postbuildcommands { "command1", "command2" } prepare() - test.capture ("\t\t\n\t\t\tcommand1\r\ncommand2\n\t\t\n") + test.capture ("\n\tcommand1\r\ncommand2\n\n") end @@ -94,9 +94,9 @@ postbuildcommands { '\' " < > &' } prepare() test.capture [[ - - ' " < > & - + + ' " < > & + ]] end @@ -110,9 +110,9 @@ postbuildmessage "Post-building..." prepare() test.capture [[ - - command1 - Post-building... - + + command1 + Post-building... + ]] end diff --git a/tests/actions/vstudio/vc2010/test_config_props.lua b/tests/actions/vstudio/vc2010/test_config_props.lua index 10fba561..68430146 100755 --- a/tests/actions/vstudio/vc2010/test_config_props.lua +++ b/tests/actions/vstudio/vc2010/test_config_props.lua @@ -33,11 +33,11 @@ function suite.structureIsCorrect_onDefaultValues() prepare() test.capture [[ - - Application - false - MultiByte - + + Application + false + MultiByte + ]] end @@ -50,8 +50,8 @@ kind "ConsoleApp" prepare() test.capture [[ - - Application + + Application ]] end @@ -59,8 +59,8 @@ kind "WindowedApp" prepare() test.capture [[ - - Application + + Application ]] end @@ -68,8 +68,8 @@ kind "SharedLib" prepare() test.capture [[ - - DynamicLibrary + + DynamicLibrary ]] end @@ -77,8 +77,8 @@ kind "StaticLib" prepare() test.capture [[ - - StaticLibrary + + StaticLibrary ]] end @@ -90,9 +90,9 @@ flags "Symbols" prepare() test.capture [[ - - Application - true + + Application + true ]] end @@ -104,10 +104,10 @@ flags "Unicode" prepare() test.capture [[ - - Application - false - Unicode + + Application + false + Unicode ]] end @@ -120,10 +120,10 @@ clr "On" prepare() test.capture [[ - - Application - false - true + + Application + false + true ]] end @@ -131,9 +131,9 @@ clr "Off" prepare() test.capture [[ - - Application - false + + Application + false ]] end @@ -141,10 +141,10 @@ clr "Unsafe" prepare() test.capture [[ - - Application - false - true + + Application + false + true ]] end @@ -152,10 +152,10 @@ clr "Safe" prepare() test.capture [[ - - Application - false - Safe + + Application + false + Safe ]] end @@ -163,10 +163,10 @@ clr "Pure" prepare() test.capture [[ - - Application - false - Pure + + Application + false + Pure ]] end @@ -179,10 +179,10 @@ flags "MFC" prepare() test.capture [[ - - Application - false - Dynamic + + Application + false + Dynamic ]] end @@ -190,10 +190,10 @@ flags { "MFC", "StaticRuntime" } prepare() test.capture [[ - - Application - false - Static + + Application + false + Static ]] end @@ -205,10 +205,10 @@ atl "Dynamic" prepare() test.capture [[ - - Application - false - Dynamic + + Application + false + Dynamic ]] end @@ -216,10 +216,10 @@ atl "Static" prepare() test.capture [[ - - Application - false - Static + + Application + false + Static ]] end @@ -233,9 +233,9 @@ flags { "Symbols", "ReleaseRuntime" } prepare() test.capture [[ - - Application - false + + Application + false ]] end @@ -251,12 +251,12 @@ kind "Makefile" prepare() test.capture [[ - - Makefile - false - bin\Debug\ - obj\Debug\ - + + Makefile + false + bin\Debug\ + obj\Debug\ + ]] end @@ -264,12 +264,12 @@ kind "None" prepare() test.capture [[ - - Makefile - false - bin\Debug\ - obj\Debug\ - + + Makefile + false + bin\Debug\ + obj\Debug\ + ]] end @@ -281,9 +281,9 @@ kind "Utility" prepare() test.capture [[ - - Utility - + + Utility + ]] end @@ -295,10 +295,10 @@ flags { "LinkTimeOptimization" } prepare() test.capture [[ - - Application - false - MultiByte - true + + Application + false + MultiByte + true ]] end diff --git a/tests/actions/vstudio/vc2010/test_excluded_configs.lua b/tests/actions/vstudio/vc2010/test_excluded_configs.lua index 81a4c8ec..32424639 100644 --- a/tests/actions/vstudio/vc2010/test_excluded_configs.lua +++ b/tests/actions/vstudio/vc2010/test_excluded_configs.lua @@ -49,11 +49,11 @@ function suite.normalLink_onIncludedConfig() prepare("Zeus") test.capture [[ - - Console - false - mainCRTStartup - + + Console + false + mainCRTStartup + ]] end @@ -68,14 +68,14 @@ function suite.explicitLink_onExcludedConfig() prepare("Ares") test.capture [[ - - Console - false - bin\Ares\Debug\MyProject2.lib;%(AdditionalDependencies) - mainCRTStartup - - - false - + + Console + false + bin\Ares\Debug\MyProject2.lib;%(AdditionalDependencies) + mainCRTStartup + + + false + ]] end diff --git a/tests/actions/vstudio/vc2010/test_globals.lua b/tests/actions/vstudio/vc2010/test_globals.lua index 2f811e86..6b5595b9 100755 --- a/tests/actions/vstudio/vc2010/test_globals.lua +++ b/tests/actions/vstudio/vc2010/test_globals.lua @@ -32,11 +32,11 @@ function suite.structureIsCorrect_onDefaultValues() prepare() test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - Win32Proj - MyProject - + + {42B5DBC6-AE1F-903D-F75D-41E363076E92} + Win32Proj + MyProject + ]] end @@ -49,12 +49,12 @@ clr "On" prepare() test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - v4.0 - ManagedCProj - MyProject - + + {42B5DBC6-AE1F-903D-F75D-41E363076E92} + v4.0 + ManagedCProj + MyProject + ]] end @@ -68,12 +68,12 @@ framework "4.5" prepare() test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - v4.5 - ManagedCProj - MyProject - + + {42B5DBC6-AE1F-903D-F75D-41E363076E92} + v4.5 + ManagedCProj + MyProject + ]] end @@ -82,13 +82,13 @@ clr "On" prepare() test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - true - v4.5 - ManagedCProj - MyProject - + + {42B5DBC6-AE1F-903D-F75D-41E363076E92} + true + v4.5 + ManagedCProj + MyProject + ]] end @@ -100,9 +100,9 @@ system "Linux" prepare() test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - + + {42B5DBC6-AE1F-903D-F75D-41E363076E92} + ]] end @@ -118,11 +118,11 @@ system "Linux" prepare() test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - Win32Proj - MyProject - + + {42B5DBC6-AE1F-903D-F75D-41E363076E92} + Win32Proj + MyProject + ]] end @@ -135,10 +135,10 @@ kind "Makefile" prepare() test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - MakeFileProj - + + {42B5DBC6-AE1F-903D-F75D-41E363076E92} + MakeFileProj + ]] end @@ -146,10 +146,10 @@ kind "None" prepare() test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - MakeFileProj - + + {42B5DBC6-AE1F-903D-F75D-41E363076E92} + MakeFileProj + ]] end @@ -163,12 +163,12 @@ filename "MyProject_2012" prepare() test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - Win32Proj - MyProject - MyProject - + + {42B5DBC6-AE1F-903D-F75D-41E363076E92} + Win32Proj + MyProject + MyProject + ]] end @@ -183,11 +183,11 @@ _ACTION = "vs2013" prepare() test.capture [[ - - {42B5DBC6-AE1F-903D-F75D-41E363076E92} - true - Win32Proj - MyProject - + + {42B5DBC6-AE1F-903D-F75D-41E363076E92} + true + Win32Proj + MyProject + ]] end diff --git a/tests/actions/vstudio/vc2010/test_imagexex_settings.lua b/tests/actions/vstudio/vc2010/test_imagexex_settings.lua index 06fb18dd..666659d7 100644 --- a/tests/actions/vstudio/vc2010/test_imagexex_settings.lua +++ b/tests/actions/vstudio/vc2010/test_imagexex_settings.lua @@ -31,12 +31,12 @@ function suite.defaultSettings() prepare() test.capture [[ - - - - - - + + + + + + ]] end @@ -47,10 +47,10 @@ configfile "testconfig.xml" prepare() test.capture [[ - - testconfig.xml - - - + + testconfig.xml + + + ]] end diff --git a/tests/actions/vstudio/vc2010/test_link.lua b/tests/actions/vstudio/vc2010/test_link.lua index de4da576..ea369fbf 100644 --- a/tests/actions/vstudio/vc2010/test_link.lua +++ b/tests/actions/vstudio/vc2010/test_link.lua @@ -35,11 +35,11 @@ kind "SharedLib" prepare() test.capture [[ - - Windows - false - bin\Debug\MyProject.lib - + + Windows + false + bin\Debug\MyProject.lib + ]] end @@ -52,13 +52,13 @@ optimize "On" prepare() test.capture [[ - - Windows - false - true - true - bin\Debug\MyProject.lib - + + Windows + false + true + true + bin\Debug\MyProject.lib + ]] end @@ -71,10 +71,10 @@ kind "ConsoleApp" prepare() test.capture [[ - - Console - false - mainCRTStartup + + Console + false + mainCRTStartup ]] end @@ -82,10 +82,10 @@ kind "WindowedApp" prepare() test.capture [[ - - Windows - false - mainCRTStartup + + Windows + false + mainCRTStartup ]] end @@ -93,11 +93,11 @@ kind "SharedLib" prepare() test.capture [[ - - Windows - false - bin\Debug\MyProject.lib - + + Windows + false + bin\Debug\MyProject.lib + ]] end @@ -105,10 +105,10 @@ kind "StaticLib" prepare() test.capture [[ - - Windows - false - + + Windows + false + ]] end @@ -121,14 +121,14 @@ flags "NoImplicitLink" prepare() test.capture [[ - - Windows - false - bin\Debug\MyProject.lib - - - false - + + Windows + false + bin\Debug\MyProject.lib + + + false + ]] end @@ -140,9 +140,9 @@ flags "Symbols" prepare() test.capture [[ - - Windows - true + + Windows + true ]] end @@ -156,10 +156,10 @@ links { "lua", "zlib" } prepare() test.capture [[ - - Windows - false - lua.lib;zlib.lib;%(AdditionalDependencies) + + Windows + false + lua.lib;zlib.lib;%(AdditionalDependencies) ]] end @@ -172,10 +172,10 @@ libdirs { "../lib", "../lib64" } prepare() test.capture [[ - - Windows - false - ..\lib;..\lib64;%(AdditionalLibraryDirectories) + + Windows + false + ..\lib;..\lib64;%(AdditionalLibraryDirectories) ]] end @@ -191,11 +191,11 @@ kind "SharedLib" prepare() test.capture [[ - - Windows - false - bin\Debug\MyProject.lib - + + Windows + false + bin\Debug\MyProject.lib + ]] end @@ -211,15 +211,15 @@ kind "SharedLib" prepare() test.capture [[ - - Windows - false - bin\Debug\MyProject2.lib;%(AdditionalDependencies) - bin\Debug\MyProject.lib - - - false - + + Windows + false + bin\Debug\MyProject2.lib;%(AdditionalDependencies) + bin\Debug\MyProject.lib + + + false + ]] end @@ -235,10 +235,10 @@ libdirs { "../lib", "../lib64" } prepare() test.capture [[ - - Windows - false - + + Windows + false + ]] end @@ -251,11 +251,11 @@ implibdir "../lib" prepare() test.capture [[ - - Windows - false - ..\lib\MyProject.lib - + + Windows + false + ..\lib\MyProject.lib + ]] end @@ -270,11 +270,11 @@ linkoptions { "/kupo" } prepare() test.capture [[ - - Windows - false - bin\Debug\MyProject.lib - /kupo %(AdditionalOptions) + + Windows + false + bin\Debug\MyProject.lib + /kupo %(AdditionalOptions) ]] end @@ -283,13 +283,13 @@ linkoptions { "/kupo" } prepare() test.capture [[ - - Windows - false - - - /kupo %(AdditionalOptions) - + + Windows + false + + + /kupo %(AdditionalOptions) + ]] end @@ -302,11 +302,11 @@ optimize "On" prepare() test.capture [[ - - Windows - false - true - true + + Windows + false + true + true ]] end @@ -319,12 +319,12 @@ files { "hello.cpp", "hello.def" } prepare() test.capture [[ - - Windows - false - bin\Debug\MyProject.lib - hello.def - + + Windows + false + bin\Debug\MyProject.lib + hello.def + ]] end @@ -337,10 +337,10 @@ links { "kernel32", "System.dll", "System.Data.dll" } prepare() test.capture [[ - - Windows - false - kernel32.lib;%(AdditionalDependencies) + + Windows + false + kernel32.lib;%(AdditionalDependencies) ]] end @@ -354,9 +354,9 @@ system "Xbox360" prepare() test.capture [[ - - false - + + false + ]] end @@ -369,10 +369,10 @@ links { "user32" } prepare() test.capture [[ - - false - user32.lib;%(AdditionalDependencies) - + + false + user32.lib;%(AdditionalDependencies) + ]] end @@ -386,11 +386,11 @@ flags { "FatalLinkWarnings" } prepare() test.capture [[ - - Console - false - mainCRTStartup - true + + Console + false + mainCRTStartup + true ]] end @@ -399,13 +399,13 @@ flags { "FatalLinkWarnings" } prepare() test.capture [[ - - Windows - false - - - true - + + Windows + false + + + true + ]] end @@ -418,11 +418,11 @@ flags { "Maps" } prepare() test.capture [[ - - Windows - false - bin\Debug\MyProject.lib - true - + + Windows + false + bin\Debug\MyProject.lib + true + ]] end diff --git a/tests/actions/vstudio/vc2010/test_nmake_props.lua b/tests/actions/vstudio/vc2010/test_nmake_props.lua index f443298b..f30a41a7 100644 --- a/tests/actions/vstudio/vc2010/test_nmake_props.lua +++ b/tests/actions/vstudio/vc2010/test_nmake_props.lua @@ -33,9 +33,9 @@ function suite.structureIsCorrect_onDefaultValues() prepare() test.capture [[ - - $(OutDir)MyProject - + + $(OutDir)MyProject + ]] end @@ -59,9 +59,9 @@ targetextension ".exe" prepare() test.capture [[ - - $(OutDir)MyProject.exe - + + $(OutDir)MyProject.exe + ]] end @@ -74,10 +74,10 @@ buildcommands { "command 1" } prepare() test.capture [[ - - $(OutDir)MyProject - command 1 - + + $(OutDir)MyProject + command 1 + ]] end @@ -85,11 +85,11 @@ buildcommands { "command 1", "command 2" } prepare() test.capture [[ - - $(OutDir)MyProject - command 1 + + $(OutDir)MyProject + command 1 command 2 - + ]] end @@ -97,10 +97,10 @@ command 2 rebuildcommands { "command 1" } prepare() test.capture [[ - - $(OutDir)MyProject - command 1 - + + $(OutDir)MyProject + command 1 + ]] end @@ -108,9 +108,9 @@ command 2 cleancommands { "command 1" } prepare() test.capture [[ - - $(OutDir)MyProject - command 1 - + + $(OutDir)MyProject + command 1 + ]] end diff --git a/tests/actions/vstudio/vc2010/test_output_props.lua b/tests/actions/vstudio/vc2010/test_output_props.lua index 793e60fb..63cc4ca9 100755 --- a/tests/actions/vstudio/vc2010/test_output_props.lua +++ b/tests/actions/vstudio/vc2010/test_output_props.lua @@ -32,13 +32,13 @@ function suite.structureIsCorrect_onDefaultValues() prepare() test.capture [[ - - true - bin\Debug\ - obj\Debug\ - MyProject - .exe - + + true + bin\Debug\ + obj\Debug\ + MyProject + .exe + ]] end @@ -68,15 +68,15 @@ system "Xbox360" prepare() test.capture [[ - - true - bin\Debug\ - $(OutDir)MyProject.exe - obj\Debug\ - MyProject - .exe - $(OutDir)$(TargetName).xex - + + true + bin\Debug\ + $(OutDir)MyProject.exe + obj\Debug\ + MyProject + .exe + $(OutDir)$(TargetName).xex + ]] end @@ -85,14 +85,14 @@ kind "StaticLib" prepare() test.capture [[ - - bin\Debug\ - $(OutDir)MyProject.lib - obj\Debug\ - MyProject - .lib - $(OutDir)$(TargetName).xex - + + bin\Debug\ + $(OutDir)MyProject.lib + obj\Debug\ + MyProject + .lib + $(OutDir)$(TargetName).xex + ]] end @@ -105,8 +105,8 @@ kind "StaticLib" prepare() test.capture [[ - - bin\Debug\ + + bin\Debug\ ]] end @@ -118,8 +118,8 @@ optimize "On" prepare() test.capture [[ - - false + + false ]] end @@ -131,9 +131,9 @@ targetdir "../bin" prepare() test.capture [[ - - true - ..\bin\ + + true + ..\bin\ ]] end @@ -145,10 +145,10 @@ objdir "../tmp" prepare() test.capture [[ - - true - bin\Debug\ - ..\tmp\Debug\ + + true + bin\Debug\ + ..\tmp\Debug\ ]] end @@ -160,11 +160,11 @@ targetname "MyTarget" prepare() test.capture [[ - - true - bin\Debug\ - obj\Debug\ - MyTarget + + true + bin\Debug\ + obj\Debug\ + MyTarget ]] end @@ -177,9 +177,9 @@ flags "NoImportLib" prepare() test.capture [[ - - true - true + + true + true ]] end @@ -188,9 +188,9 @@ flags "NoImportLib" prepare() test.capture [[ - - true - bin\Debug\ + + true + bin\Debug\ ]] end @@ -203,13 +203,13 @@ flags "NoManifest" prepare() test.capture [[ - - true - bin\Debug\ - obj\Debug\ - MyProject - .exe - false + + true + bin\Debug\ + obj\Debug\ + MyProject + .exe + false ]] end @@ -222,14 +222,14 @@ targetextension "" prepare() test.capture [[ - - true - bin\Debug\ - obj\Debug\ - MyProject - - - + + true + bin\Debug\ + obj\Debug\ + MyProject + + + ]] end @@ -243,14 +243,14 @@ cleanextensions { ".temp1", ".temp2" } prepare() test.capture [[ - - true - bin\Debug\ - obj\Debug\ - MyProject - .exe - *.temp1;*.temp2;$(ExtensionsToDeleteOnClean) - + + true + bin\Debug\ + obj\Debug\ + MyProject + .exe + *.temp1;*.temp2;$(ExtensionsToDeleteOnClean) + ]] end @@ -263,14 +263,14 @@ sysincludedirs { "$(DXSDK_DIR)/Include" } prepare() test.capture [[ - - true - bin\Debug\ - obj\Debug\ - MyProject - .exe - $(DXSDK_DIR)\Include;$(IncludePath) - + + true + bin\Debug\ + obj\Debug\ + MyProject + .exe + $(DXSDK_DIR)\Include;$(IncludePath) + ]] end @@ -278,13 +278,13 @@ syslibdirs { "$(DXSDK_DIR)/lib/x86" } prepare() test.capture [[ - - true - bin\Debug\ - obj\Debug\ - MyProject - .exe - $(DXSDK_DIR)\lib\x86;$(LibraryPath) - + + true + bin\Debug\ + obj\Debug\ + MyProject + .exe + $(DXSDK_DIR)\lib\x86;$(LibraryPath) + ]] end diff --git a/tests/actions/vstudio/vc2010/test_project_configs.lua b/tests/actions/vstudio/vc2010/test_project_configs.lua index ca98c96a..f6ee4de2 100755 --- a/tests/actions/vstudio/vc2010/test_project_configs.lua +++ b/tests/actions/vstudio/vc2010/test_project_configs.lua @@ -32,16 +32,16 @@ function suite.win32Listed_onNoPlatforms() prepare() test.capture [[ - - - Debug - Win32 - - - Release - Win32 - - + + + Debug + Win32 + + + Release + Win32 + + ]] end @@ -60,24 +60,24 @@ architecture "x86_64" prepare() test.capture [[ - - - Debug 32b - Win32 - - - Debug 32b - x64 - - - Debug 64b - Win32 - - - Debug 64b - x64 - - + + + Debug 32b + Win32 + + + Debug 32b + x64 + + + Debug 64b + Win32 + + + Debug 64b + x64 + + ]] end @@ -91,15 +91,15 @@ platforms { "x86", "x86_64" } prepare() test.capture [[ - - - Debug - Win32 - - - Debug - x64 - - + + + Debug + Win32 + + + Debug + x64 + + ]] end diff --git a/tests/actions/vstudio/vc2010/test_prop_sheet.lua b/tests/actions/vstudio/vc2010/test_prop_sheet.lua index 6fecfd5a..5e24838f 100755 --- a/tests/actions/vstudio/vc2010/test_prop_sheet.lua +++ b/tests/actions/vstudio/vc2010/test_prop_sheet.lua @@ -32,8 +32,8 @@ function suite.structureIsCorrect_onDefaultValues() prepare() test.capture [[ - - - + + + ]] end