From b251234b27c945e407adbd964e52c6c77d7e1419 Mon Sep 17 00:00:00 2001 From: Sam Surtees Date: Wed, 26 Apr 2017 03:15:33 +1000 Subject: [PATCH] Cleaned up inconsistencies in whitespace --- modules/codelite/_preload.lua | 2 +- modules/d/actions/gmake.lua | 4 +- modules/d/tools/dmd.lua | 2 +- modules/d/tools/gdc.lua | 2 +- modules/d/tools/ldc.lua | 2 +- modules/raw/_preload.lua | 14 +-- modules/raw/raw_action.lua | 108 +++++++++--------- modules/xcode/xcode_common.lua | 4 +- modules/xcode/xcode_project.lua | 88 +++++++------- src/_premake_init.lua | 2 +- src/actions/make/make_csharp.lua | 6 +- src/base/api.lua | 12 +- src/base/config.lua | 2 +- src/base/path.lua | 2 +- src/base/project.lua | 6 +- src/host/os_islink.c | 8 +- src/host/os_stat.c | 2 +- src/host/premake.c | 12 +- src/tools/dotnet.lua | 2 +- src/tools/gcc.lua | 2 +- tests/actions/make/cpp/test_clang.lua | 2 +- tests/actions/make/cpp/test_file_rules.lua | 4 +- tests/actions/make/cpp/test_make_linking.lua | 40 +++---- tests/actions/make/cpp/test_objects.lua | 8 +- tests/actions/make/cpp/test_target_rules.lua | 4 +- tests/actions/make/cpp/test_tools.lua | 2 +- tests/actions/make/cpp/test_wiidev.lua | 2 +- tests/actions/make/cs/test_embed_files.lua | 12 +- tests/actions/make/cs/test_flags.lua | 12 +- tests/actions/make/cs/test_links.lua | 58 +++++----- tests/actions/make/cs/test_sources.lua | 12 +- .../actions/vstudio/vc2010/test_build_log.lua | 2 +- tests/base/test_configset.lua | 6 +- tests/base/test_path.lua | 16 +-- tests/oven/test_filtering.lua | 2 +- tests/project/test_vpaths.lua | 10 +- 36 files changed, 237 insertions(+), 237 deletions(-) diff --git a/modules/codelite/_preload.lua b/modules/codelite/_preload.lua index be544968..e62002c2 100644 --- a/modules/codelite/_preload.lua +++ b/modules/codelite/_preload.lua @@ -23,7 +23,7 @@ valid_kinds = { "ConsoleApp", "WindowedApp", "Makefile", "SharedLib", "StaticLib", "Utility" }, valid_tools = { - cc = { "gcc", "clang", "msc" } + cc = { "gcc", "clang", "msc" } }, supports_language = function(lang) return p.languages.isc(lang) or diff --git a/modules/d/actions/gmake.lua b/modules/d/actions/gmake.lua index 6aa148e7..020ba547 100644 --- a/modules/d/actions/gmake.lua +++ b/modules/d/actions/gmake.lua @@ -159,8 +159,8 @@ _p('\t@echo $(notdir $<)') _p('\t$(SILENT) $(DC) $(ALL_DFLAGS) $(OUTPUTFLAG) -c $<') else - oldfn(prj, node) - end + oldfn(prj, node) + end end) diff --git a/modules/d/tools/dmd.lua b/modules/d/tools/dmd.lua index 59161946..a4c8a6f2 100644 --- a/modules/d/tools/dmd.lua +++ b/modules/d/tools/dmd.lua @@ -9,7 +9,7 @@ local p = premake local project = p.project local config = p.config - local d = p.modules.d + local d = p.modules.d -- -- Set default tools diff --git a/modules/d/tools/gdc.lua b/modules/d/tools/gdc.lua index 21dc08c3..64bcfe41 100644 --- a/modules/d/tools/gdc.lua +++ b/modules/d/tools/gdc.lua @@ -10,7 +10,7 @@ local gdc = p.tools.gdc local project = p.project local config = p.config - local d = p.modules.d + local d = p.modules.d -- -- Set default tools diff --git a/modules/d/tools/ldc.lua b/modules/d/tools/ldc.lua index 4d461885..95261a40 100644 --- a/modules/d/tools/ldc.lua +++ b/modules/d/tools/ldc.lua @@ -10,7 +10,7 @@ local ldc = p.tools.ldc local project = p.project local config = p.config - local d = p.modules.d + local d = p.modules.d -- diff --git a/modules/raw/_preload.lua b/modules/raw/_preload.lua index 3c056a2e..d133500e 100644 --- a/modules/raw/_preload.lua +++ b/modules/raw/_preload.lua @@ -1,14 +1,14 @@ newaction { - trigger = "raw", - shortname = "Raw output", - description = "Generate raw representation of Premake structures", + trigger = "raw", + shortname = "Raw output", + description = "Generate raw representation of Premake structures", - onsolution = function(sln) - require('raw') + onsolution = function(sln) + require('raw') - premake.generate(sln, ".raw", premake.raw.solution) - end, + premake.generate(sln, ".raw", premake.raw.solution) + end, } return function(cfg) diff --git a/modules/raw/raw_action.lua b/modules/raw/raw_action.lua index f2539105..211249cf 100644 --- a/modules/raw/raw_action.lua +++ b/modules/raw/raw_action.lua @@ -4,73 +4,73 @@ local raw = p.raw local gvisited = { } function raw.solution(sln) - if not gvisited[sln.global] then - gvisited[sln.global] = true - raw.printTable({ global = sln.global }) - end + if not gvisited[sln.global] then + gvisited[sln.global] = true + raw.printTable({ global = sln.global }) + end end function raw.printTable(t, i) - i = i or 0 - placement = raw._createPlacement(t) - raw._printTableRecursive(t, i, placement) + i = i or 0 + placement = raw._createPlacement(t) + raw._printTableRecursive(t, i, placement) end function raw._printTableRecursive(t, i, placement) - elements = { } - for k, v in pairs(t) do - table.insert(elements, { key = k, value = v }) - end + elements = { } + for k, v in pairs(t) do + table.insert(elements, { key = k, value = v }) + end - table.sort(elements, function(a, b) - local n1 = type(a.key) == "number" - local n2 = type(b.key) == "number" - if n1 ~= n2 then - return n1 - end + table.sort(elements, function(a, b) + local n1 = type(a.key) == "number" + local n2 = type(b.key) == "number" + if n1 ~= n2 then + return n1 + end - local k1 = n1 and a.key or raw._encode(a.key) - local k2 = n2 and b.key or raw._encode(b.key) - return k1 < k2 - end) + local k1 = n1 and a.key or raw._encode(a.key) + local k2 = n2 and b.key or raw._encode(b.key) + return k1 < k2 + end) - for _, elem in ipairs(elements) do - p = placement[elem.value] - if p and elem.key == p.key and t == p.parent then - _p(i, "%s", raw._encode(elem.key) .. ': ' .. raw._encode(elem.value) .. ' {') - raw._printTableRecursive(elem.value, i + 1, placement) - _p(i, '} # ' .. raw._encode(elem.key)) - else - _p(i, "%s", raw._encode(elem.key) .. ': ' .. raw._encode(elem.value)) - end - end + for _, elem in ipairs(elements) do + p = placement[elem.value] + if p and elem.key == p.key and t == p.parent then + _p(i, "%s", raw._encode(elem.key) .. ': ' .. raw._encode(elem.value) .. ' {') + raw._printTableRecursive(elem.value, i + 1, placement) + _p(i, '} # ' .. raw._encode(elem.key)) + else + _p(i, "%s", raw._encode(elem.key) .. ': ' .. raw._encode(elem.value)) + end + end end function raw._createPlacement(tbl) - placement = { } - placementList = { tbl } - while #placementList ~= 0 do - parentList = { } - for _, parent in ipairs(placementList) do - for k, v in pairs(parent) do - if type(v) == "table" and not placement[v] then - table.insert(parentList, v) - placement[v] = { - parent = parent, - key = k - } - end - end - end - placementList = parentList - end - return placement + placement = { } + placementList = { tbl } + while #placementList ~= 0 do + parentList = { } + for _, parent in ipairs(placementList) do + for k, v in pairs(parent) do + if type(v) == "table" and not placement[v] then + table.insert(parentList, v) + placement[v] = { + parent = parent, + key = k + } + end + end + end + placementList = parentList + end + return placement end function raw._encode(v) - if type(v) == "string" then - return '"' .. v .. '"' - else - return tostring(v) - end + if type(v) == "string" then + return '"' .. v .. '"' + else + return tostring(v) + end end diff --git a/modules/xcode/xcode_common.lua b/modules/xcode/xcode_common.lua index c15992ba..3670ebb6 100644 --- a/modules/xcode/xcode_common.lua +++ b/modules/xcode/xcode_common.lua @@ -7,9 +7,9 @@ local p = premake local xcode = p.modules.xcode local tree = p.tree - local workspace = p.workspace + local workspace = p.workspace local project = p.project - local config = p.config + local config = p.config local fileconfig = p.fileconfig diff --git a/modules/xcode/xcode_project.lua b/modules/xcode/xcode_project.lua index 8a968e46..819b7723 100644 --- a/modules/xcode/xcode_project.lua +++ b/modules/xcode/xcode_project.lua @@ -39,33 +39,33 @@ table.insert(tr.configs, cfg) end - -- convert localized resources from their filesystem layout (English.lproj/MainMenu.xib) + -- convert localized resources from their filesystem layout (English.lproj/MainMenu.xib) -- to Xcode's display layout (MainMenu.xib/English). - tree.traverse(tr, { - onbranch = function(node) - if path.getextension(node.name) == ".lproj" then - local lang = path.getbasename(node.name) -- "English", "French", etc. + tree.traverse(tr, { + onbranch = function(node) + if path.getextension(node.name) == ".lproj" then + local lang = path.getbasename(node.name) -- "English", "French", etc. - -- create a new language group for each file it contains - for _, filenode in ipairs(node.children) do - local grpnode = node.parent.children[filenode.name] - if not grpnode then - grpnode = tree.insert(node.parent, tree.new(filenode.name)) - grpnode.kind = "vgroup" - end + -- create a new language group for each file it contains + for _, filenode in ipairs(node.children) do + local grpnode = node.parent.children[filenode.name] + if not grpnode then + grpnode = tree.insert(node.parent, tree.new(filenode.name)) + grpnode.kind = "vgroup" + end - -- convert the file node to a language node and add to the group - filenode.name = path.getbasename(lang) - tree.insert(grpnode, filenode) - end + -- convert the file node to a language node and add to the group + filenode.name = path.getbasename(lang) + tree.insert(grpnode, filenode) + end -- remove this directory from the tree - tree.remove(node) - end - end - }) + tree.remove(node) + end + end + }) - -- the special folder "Frameworks" lists all linked frameworks + -- the special folder "Frameworks" lists all linked frameworks tr.frameworks = tree.new("Frameworks") for cfg in project.eachconfig(prj) do for _, link in ipairs(config.getlinks(cfg, "system", "fullpath")) do @@ -73,9 +73,9 @@ if xcode.isframework(name) and not tr.frameworks.children[name] then node = tree.insert(tr.frameworks, tree.new(name)) node.path = link - end - end - end + end + end + end -- only add it to the tree if there are frameworks to link if #tr.frameworks.children > 0 then @@ -84,7 +84,7 @@ -- the special folder "Products" holds the target produced by the project; this -- is populated below - tr.products = tree.insert(tr, tree.new("Products")) + tr.products = tree.insert(tr, tree.new("Products")) -- the special folder "Projects" lists sibling project dependencies tr.projects = tree.new("Projects") @@ -95,31 +95,31 @@ xcode.addDependency(prj, tr, dep, false) end - if #tr.projects.children > 0 then - tree.insert(tr, tr.projects) - end + if #tr.projects.children > 0 then + tree.insert(tr, tr.projects) + end - -- Final setup - tree.traverse(tr, { - onnode = function(node) - -- assign IDs to every node in the tree - node.id = xcode.newid(node.name, nil, node.path) + -- Final setup + tree.traverse(tr, { + onnode = function(node) + -- assign IDs to every node in the tree + node.id = xcode.newid(node.name, nil, node.path) - node.isResource = xcode.isItemResource(prj, node) + node.isResource = xcode.isItemResource(prj, node) - -- assign build IDs to buildable files + -- assign build IDs to buildable files if xcode.getbuildcategory(node) and not node.excludefrombuild then - node.buildid = xcode.newid(node.name, "build", node.path) - end + node.buildid = xcode.newid(node.name, "build", node.path) + end - -- remember key files that are needed elsewhere - if string.endswith(node.name, "Info.plist") then - tr.infoplist = node - end - end - }, true) + -- remember key files that are needed elsewhere + if string.endswith(node.name, "Info.plist") then + tr.infoplist = node + end + end + }, true) - -- Plug in the product node into the Products folder in the tree. The node + -- Plug in the product node into the Products folder in the tree. The node -- was built in xcode.prepareWorkspace() in xcode_common.lua; it contains IDs -- that are necessary for inter-project dependencies node = tree.insert(tr.products, prj.xcode.projectnode) diff --git a/src/_premake_init.lua b/src/_premake_init.lua index 9da7acb9..0ab14664 100644 --- a/src/_premake_init.lua +++ b/src/_premake_init.lua @@ -1110,7 +1110,7 @@ tokens = true, } - api.register { + api.register { name = "usingdirs", scope = "config", kind = "list:directory", diff --git a/src/actions/make/make_csharp.lua b/src/actions/make/make_csharp.lua index f629ee95..6145ab5e 100644 --- a/src/actions/make/make_csharp.lua +++ b/src/actions/make/make_csharp.lua @@ -94,9 +94,9 @@ function cs.getresourcefilename(cfg, fname) if path.getextension(fname) == ".resx" then - local name = cfg.buildtarget.basename .. "." - local dir = path.getdirectory(fname) - if dir ~= "." then + local name = cfg.buildtarget.basename .. "." + local dir = path.getdirectory(fname) + if dir ~= "." then name = name .. path.translate(dir, ".") .. "." end return "$(OBJDIR)/" .. p.esc(name .. path.getbasename(fname)) .. ".resources" diff --git a/src/base/api.lua b/src/base/api.lua index 659290a2..bbac5130 100755 --- a/src/base/api.lua +++ b/src/base/api.lua @@ -318,12 +318,12 @@ -- The alias name (another string value). --- - function api.alias(original, alias) - p.alias(_G, original, alias) - if _G["remove" .. original] then - p.alias(_G, "remove" .. original, "remove" .. alias) - end - end + function api.alias(original, alias) + p.alias(_G, original, alias) + if _G["remove" .. original] then + p.alias(_G, "remove" .. original, "remove" .. alias) + end + end diff --git a/src/base/config.lua b/src/base/config.lua index 879a5fe2..ed9044d0 100755 --- a/src/base/config.lua +++ b/src/base/config.lua @@ -231,7 +231,7 @@ -- An array containing the requested link target information. -- - function config.getlinks(cfg, kind, part, linkage) + function config.getlinks(cfg, kind, part, linkage) local result = {} -- If I'm building a list of link directories, include libdirs diff --git a/src/base/path.lua b/src/base/path.lua index 28aa8b3f..8616e33d 100644 --- a/src/base/path.lua +++ b/src/base/path.lua @@ -90,7 +90,7 @@ -- function path.getextension(p) - p = path.getname(p) + p = path.getname(p) local i = p:findlast(".", true) if (i) then return p:sub(i) diff --git a/src/base/project.lua b/src/base/project.lua index 48ae00bb..734c2dbc 100755 --- a/src/base/project.lua +++ b/src/base/project.lua @@ -190,9 +190,9 @@ for cfg in project.eachconfig(prj) do if not depsOnly then for _, link in ipairs(cfg.links) do - if link ~= prj.name then - add_to_project_list(cfg, link, result) - end + if link ~= prj.name then + add_to_project_list(cfg, link, result) + end end end if not linkOnly then diff --git a/src/host/os_islink.c b/src/host/os_islink.c index 4ce0902d..ee3a2089 100644 --- a/src/host/os_islink.c +++ b/src/host/os_islink.c @@ -31,10 +31,10 @@ int os_islink(lua_State* L) #else { struct stat buf; - if (lstat(path, &buf) == 0) { - lua_pushboolean(L, S_ISLNK(buf.st_mode)); - return 1; - } + if (lstat(path, &buf) == 0) { + lua_pushboolean(L, S_ISLNK(buf.st_mode)); + return 1; + } } #endif diff --git a/src/host/os_stat.c b/src/host/os_stat.c index 03d70a46..64cfe42a 100644 --- a/src/host/os_stat.c +++ b/src/host/os_stat.c @@ -13,7 +13,7 @@ int os_stat(lua_State* L) struct stat s; const char* filename = luaL_checkstring(L, 1); - if (stat(filename, &s) != 0) + if (stat(filename, &s) != 0) { lua_pushnil(L); switch (errno) diff --git a/src/host/premake.c b/src/host/premake.c index 86449d4f..949a4b51 100644 --- a/src/host/premake.c +++ b/src/host/premake.c @@ -501,8 +501,8 @@ static int run_premake_main(lua_State* L, const char* script) * argument allowed as an override. Debug builds will look at the * local file system first, then fall back to embedded. */ #if defined(NDEBUG) - int z = premake_test_file(L, script, - TEST_SCRIPTS | TEST_EMBEDDED); + int z = premake_test_file(L, script, + TEST_SCRIPTS | TEST_EMBEDDED); #else int z = premake_test_file(L, script, TEST_LOCAL | TEST_SCRIPTS | TEST_PATH | TEST_EMBEDDED); @@ -529,10 +529,10 @@ static int run_premake_main(lua_State* L, const char* script) * contents of the file's script. */ - const buildin_mapping* premake_find_embedded_script(const char* filename) - { +const buildin_mapping* premake_find_embedded_script(const char* filename) +{ #if !defined(PREMAKE_NO_BUILTIN_SCRIPTS) - int i; + int i; for (i = 0; builtin_scripts[i].name != NULL; ++i) { if (strcmp(builtin_scripts[i].name, filename) == 0) { return builtin_scripts + i; @@ -540,7 +540,7 @@ static int run_premake_main(lua_State* L, const char* script) } #endif return NULL; - } +} diff --git a/src/tools/dotnet.lua b/src/tools/dotnet.lua index 18b06ed1..af33ba6e 100644 --- a/src/tools/dotnet.lua +++ b/src/tools/dotnet.lua @@ -123,7 +123,7 @@ if fcfg.buildaction == "Component" or fcfg.buildaction == "Form" or fcfg.buildaction == "UserControl" - then + then info.SubType = fcfg.buildaction end diff --git a/src/tools/gcc.lua b/src/tools/gcc.lua index df8997f2..615c65b2 100644 --- a/src/tools/gcc.lua +++ b/src/tools/gcc.lua @@ -438,7 +438,7 @@ if #static_syslibs > 1 then table.insert(static_syslibs, "-Wl,-Bdynamic") move(static_syslibs, result) - end + end move(shared_syslibs, result) return result diff --git a/tests/actions/make/cpp/test_clang.lua b/tests/actions/make/cpp/test_clang.lua index 3410b26a..f8cb1e0d 100644 --- a/tests/actions/make/cpp/test_clang.lua +++ b/tests/actions/make/cpp/test_clang.lua @@ -41,6 +41,6 @@ ifeq ($(config),debug) ifeq ($(origin AR), default) AR = ar endif - ]] + ]] end diff --git a/tests/actions/make/cpp/test_file_rules.lua b/tests/actions/make/cpp/test_file_rules.lua index 17647d3f..0462a370 100644 --- a/tests/actions/make/cpp/test_file_rules.lua +++ b/tests/actions/make/cpp/test_file_rules.lua @@ -52,7 +52,7 @@ else endif $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - ]] + ]] end @@ -81,7 +81,7 @@ else endif $(SILENT) $(CXX) $(ALL_CXXFLAGS) $(FORCE_INCLUDE) -o "$@" -MF "$(@:%.o=%.d)" -c "$<" - ]] + ]] end diff --git a/tests/actions/make/cpp/test_make_linking.lua b/tests/actions/make/cpp/test_make_linking.lua index 4d13597e..ebd8de61 100644 --- a/tests/actions/make/cpp/test_make_linking.lua +++ b/tests/actions/make/cpp/test_make_linking.lua @@ -153,38 +153,38 @@ -- Check a linking to a sibling shared library using -l and -L. -- - function suite.links_onSiblingSharedLib() - links "MyProject2" - flags { "RelativeLinks" } + function suite.links_onSiblingSharedLib() + links "MyProject2" + flags { "RelativeLinks" } - test.createproject(wks) - kind "SharedLib" - location "build" + test.createproject(wks) + kind "SharedLib" + location "build" - prepare { "ldFlags", "libs", "ldDeps" } - test.capture [[ + prepare { "ldFlags", "libs", "ldDeps" } + test.capture [[ ALL_LDFLAGS += $(LDFLAGS) -Lbuild/bin/Debug -Wl,-rpath,'$$ORIGIN/../../build/bin/Debug' -s LIBS += -lMyProject2 LDDEPS += build/bin/Debug/libMyProject2.so - ]] - end + ]] + end - function suite.links_onMacOSXSiblingSharedLib() - _TARGET_OS = "macosx" - links "MyProject2" + function suite.links_onMacOSXSiblingSharedLib() + _TARGET_OS = "macosx" + links "MyProject2" flags { "RelativeLinks" } - test.createproject(wks) - kind "SharedLib" - location "build" + test.createproject(wks) + kind "SharedLib" + location "build" - prepare { "ldFlags", "libs", "ldDeps" } - test.capture [[ + prepare { "ldFlags", "libs", "ldDeps" } + test.capture [[ ALL_LDFLAGS += $(LDFLAGS) -Lbuild/bin/Debug -Wl,-rpath,'@loader_path/../../build/bin/Debug' -Wl,-x LIBS += -lMyProject2 LDDEPS += build/bin/Debug/libMyProject2.dylib - ]] - end + ]] + end -- -- Check a linking multiple siblings. diff --git a/tests/actions/make/cpp/test_objects.lua b/tests/actions/make/cpp/test_objects.lua index 801c61ee..5b8a6bf4 100644 --- a/tests/actions/make/cpp/test_objects.lua +++ b/tests/actions/make/cpp/test_objects.lua @@ -37,7 +37,7 @@ OBJECTS := \ $(OBJDIR)/hello.o \ - ]] + ]] end @@ -52,7 +52,7 @@ OBJECTS := \ OBJECTS := \ $(OBJDIR)/hello.o \ - ]] + ]] end @@ -85,7 +85,7 @@ ifeq ($(config),release) endif - ]] + ]] end @@ -101,7 +101,7 @@ OBJECTS := \ $(OBJDIR)/hello.o \ $(OBJDIR)/hello1.o \ - ]] + ]] end diff --git a/tests/actions/make/cpp/test_target_rules.lua b/tests/actions/make/cpp/test_target_rules.lua index f8fb3cc0..0009193c 100644 --- a/tests/actions/make/cpp/test_target_rules.lua +++ b/tests/actions/make/cpp/test_target_rules.lua @@ -35,7 +35,7 @@ test.capture [[ all: prebuild prelink $(TARGET) @: - ]] + ]] end @@ -53,5 +53,5 @@ all: prebuild prelink $(TARGET) $(dir $(TARGETDIR))PkgInfo $(dir $(TARGETDIR))In $(dir $(TARGETDIR))PkgInfo: $(dir $(TARGETDIR))Info.plist: - ]] + ]] end diff --git a/tests/actions/make/cpp/test_tools.lua b/tests/actions/make/cpp/test_tools.lua index 80ebd4f6..6b5a0831 100644 --- a/tests/actions/make/cpp/test_tools.lua +++ b/tests/actions/make/cpp/test_tools.lua @@ -31,5 +31,5 @@ make.cppTools(cfg, p.tools.gcc) test.capture [[ RESCOMP = windres - ]] + ]] end diff --git a/tests/actions/make/cpp/test_wiidev.lua b/tests/actions/make/cpp/test_wiidev.lua index 54a6113e..063e517d 100644 --- a/tests/actions/make/cpp/test_wiidev.lua +++ b/tests/actions/make/cpp/test_wiidev.lua @@ -32,7 +32,7 @@ make.cppFlags(cfg, p.tools.gcc) test.capture [[ ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP -I$(LIBOGC_INC) $(MACHDEP) $(DEFINES) $(INCLUDES) - ]] + ]] end function suite.writesCorrectLinkerFlags() diff --git a/tests/actions/make/cs/test_embed_files.lua b/tests/actions/make/cs/test_embed_files.lua index 36b8d141..79978939 100644 --- a/tests/actions/make/cs/test_embed_files.lua +++ b/tests/actions/make/cs/test_embed_files.lua @@ -38,8 +38,8 @@ EMBEDFILES += \ $(OBJDIR)/MyProject.Hello.resources \ - ]] - end + ]] + end -- @@ -53,8 +53,8 @@ EMBEDFILES += \ EMBEDFILES += \ $(OBJDIR)/MyProject.Hello.resources \ - ]] - end + ]] + end -- @@ -71,5 +71,5 @@ EMBEDFILES += \ EMBEDFILES += \ Hello.txt \ - ]] - end + ]] + end diff --git a/tests/actions/make/cs/test_flags.lua b/tests/actions/make/cs/test_flags.lua index ac22a2c3..5717e315 100644 --- a/tests/actions/make/cs/test_flags.lua +++ b/tests/actions/make/cs/test_flags.lua @@ -35,8 +35,8 @@ prepare() test.capture [[ FLAGS = /noconfig - ]] - end + ]] + end -- @@ -48,8 +48,8 @@ prepare() test.capture [[ FLAGS = /unsafe /noconfig - ]] - end + ]] + end -- @@ -61,5 +61,5 @@ prepare() test.capture [[ FLAGS = /noconfig /win32icon:"MyProject.ico" - ]] - end + ]] + end diff --git a/tests/actions/make/cs/test_links.lua b/tests/actions/make/cs/test_links.lua index 6116eb40..cc32b613 100644 --- a/tests/actions/make/cs/test_links.lua +++ b/tests/actions/make/cs/test_links.lua @@ -5,56 +5,56 @@ -- local p = premake - local suite = test.declare("make_cs_links") - local make = p.make - local cs = p.make.cs - local project = p.project + local suite = test.declare("make_cs_links") + local make = p.make + local cs = p.make.cs + local project = p.project -- -- Setup -- - local wks, prj + local wks, prj - function suite.setup() - wks, prj = test.createWorkspace() - end + function suite.setup() + wks, prj = test.createWorkspace() + end - local function prepare() - local cfg = test.getconfig(prj, "Debug") - make.csLinkCmd(cfg, p.tools.dotnet) - end + local function prepare() + local cfg = test.getconfig(prj, "Debug") + make.csLinkCmd(cfg, p.tools.dotnet) + end -- -- Should return an empty assignment if nothing has been specified. -- - function suite.isEmptyAssignment_onNoSettings() - prepare() - test.capture [[ + function suite.isEmptyAssignment_onNoSettings() + prepare() + test.capture [[ DEPENDS = - ]] - end + ]] + end -- -- Files that can be compiled should be listed here. -- - function suite.doesListLinkDependencyFiles() - links { "MyProject2", "MyProject3" } + function suite.doesListLinkDependencyFiles() + links { "MyProject2", "MyProject3" } - test.createproject(wks) - kind "SharedLib" - language "C#" + test.createproject(wks) + kind "SharedLib" + language "C#" - test.createproject(wks) - kind "SharedLib" - language "C#" + test.createproject(wks) + kind "SharedLib" + language "C#" - prepare () - test.capture [[ + prepare () + test.capture [[ DEPENDS = bin/Debug/MyProject2.dll bin/Debug/MyProject3.dll - ]] - end + ]] + end diff --git a/tests/actions/make/cs/test_sources.lua b/tests/actions/make/cs/test_sources.lua index 0789c6c9..3021bb37 100644 --- a/tests/actions/make/cs/test_sources.lua +++ b/tests/actions/make/cs/test_sources.lua @@ -38,8 +38,8 @@ SOURCES += \ Hello.cs \ - ]] - end + ]] + end -- -- Path delimiter uses slash instead of backslash @@ -68,8 +68,8 @@ SOURCES += \ SOURCES += \ Hello.cs \ - ]] - end + ]] + end -- @@ -86,5 +86,5 @@ SOURCES += \ SOURCES += \ Hello.txt \ - ]] - end + ]] + end diff --git a/tests/actions/vstudio/vc2010/test_build_log.lua b/tests/actions/vstudio/vc2010/test_build_log.lua index c585f8c8..1c1a2d6b 100644 --- a/tests/actions/vstudio/vc2010/test_build_log.lua +++ b/tests/actions/vstudio/vc2010/test_build_log.lua @@ -44,7 +44,7 @@ function suite.writesPathIfSet() buildlog "logs/MyCustomLogFile.log" prepare() - test.capture [[ + test.capture [[ logs\MyCustomLogFile.log diff --git a/tests/base/test_configset.lua b/tests/base/test_configset.lua index e65737a7..e7141128 100644 --- a/tests/base/test_configset.lua +++ b/tests/base/test_configset.lua @@ -127,9 +127,9 @@ -- List fields should return an empty list of not set. -- - function suite.lists_returnsEmptyTable_onNotSet() - test.isequal({}, configset.fetch(cset, field.get("buildoptions"), {})) - end + function suite.lists_returnsEmptyTable_onNotSet() + test.isequal({}, configset.fetch(cset, field.get("buildoptions"), {})) + end -- diff --git a/tests/base/test_path.lua b/tests/base/test_path.lua index 0f3879f9..bdef3866 100755 --- a/tests/base/test_path.lua +++ b/tests/base/test_path.lua @@ -147,7 +147,7 @@ test.isequal("", path.getextension("filename")) end - function suite.getextension_ReturnsEmptyString_OnPathWithDotAndNoExtension() + function suite.getextension_ReturnsEmptyString_OnPathWithDotAndNoExtension() test.isequal("", path.getextension("/.premake/premake")) end @@ -155,7 +155,7 @@ test.isequal(".txt", path.getextension("filename.txt")) end - function suite.getextension_ReturnsExtension_OnPathWithDot() + function suite.getextension_ReturnsExtension_OnPathWithDot() test.isequal(".lua", path.getextension("/.premake/premake.lua")) end @@ -222,7 +222,7 @@ end function suite.getrelative_ignoresTrailingSlashes() - test.isequal("c", path.getrelative("/a/b/","/a/b/c")) + test.isequal("c", path.getrelative("/a/b/","/a/b/c")) end function suite.getrelative_returnsAbsPath_onContactWithFileSysRoot() @@ -410,19 +410,19 @@ end function suite.getabsolute_replaceExtensionWithDotMultipleDots() - test.isequal("/nunit.framework.foo", path.replaceextension("/nunit.framework.dll",".foo")) + test.isequal("/nunit.framework.foo", path.replaceextension("/nunit.framework.dll",".foo")) end function suite.getabsolute_replaceExtensionCompletePath() - test.isequal("/nunit/framework/main.foo", path.replaceextension("/nunit/framework/main.cpp",".foo")) + test.isequal("/nunit/framework/main.foo", path.replaceextension("/nunit/framework/main.cpp",".foo")) end function suite.getabsolute_replaceExtensionWithoutExtension() - test.isequal("/nunit/framework/main.foo", path.replaceextension("/nunit/framework/main",".foo")) + test.isequal("/nunit/framework/main.foo", path.replaceextension("/nunit/framework/main",".foo")) end - function suite.getabsolute_replaceExtensionWithEmptyString() - test.isequal("foo", path.replaceextension("foo.lua","")) + function suite.getabsolute_replaceExtensionWithEmptyString() + test.isequal("foo", path.replaceextension("foo.lua","")) end diff --git a/tests/oven/test_filtering.lua b/tests/oven/test_filtering.lua index a9906a5b..a5ebdffa 100644 --- a/tests/oven/test_filtering.lua +++ b/tests/oven/test_filtering.lua @@ -21,7 +21,7 @@ local function prepare() wks = test.getWorkspace(wks) prj = test.getproject(wks, 1) - cfg = test.getconfig(prj, "Debug") + cfg = test.getconfig(prj, "Debug") end diff --git a/tests/project/test_vpaths.lua b/tests/project/test_vpaths.lua index 63a58d8d..e1b6173e 100644 --- a/tests/project/test_vpaths.lua +++ b/tests/project/test_vpaths.lua @@ -124,11 +124,11 @@ test.isequal("Headers/myproject/hello.h", run()) end - function suite.matchBaseFileName_onWildcardExtension() - files { "hello.cpp" } - vpaths { ["Sources"] = "hello.*" } - test.isequal("Sources/hello.cpp", run()) - end + function suite.matchBaseFileName_onWildcardExtension() + files { "hello.cpp" } + vpaths { ["Sources"] = "hello.*" } + test.isequal("Sources/hello.cpp", run()) + end --