Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/premake-4.x-stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLiam Devine <dmail00@gmail.com>2011-03-26 03:39:26 +0300
committerLiam Devine <dmail00@gmail.com>2011-03-26 03:39:26 +0300
commitb8d2fd4f2bda9f0511cf5f7323e024e719770661 (patch)
tree193db1b350580f8ab6c0a3388db88c058f1d4b32 /tests
parent39c9b7b88e78a7f0d193c4c022d8a46ddc3ac734 (diff)
parent0926bb12c8a8bab752960aef157b42fba5a0556f (diff)
* Patch 3043933 gmake incorrectly links using -l when a solution contains a .so and .a of the same name and the static lib is wanted (Jonathan Derque)
Diffstat (limited to 'tests')
-rw-r--r--tests/actions/make/test_make_linking.lua43
-rw-r--r--tests/premake4.lua1
2 files changed, 44 insertions, 0 deletions
diff --git a/tests/actions/make/test_make_linking.lua b/tests/actions/make/test_make_linking.lua
new file mode 100644
index 0000000..dd9b26d
--- /dev/null
+++ b/tests/actions/make/test_make_linking.lua
@@ -0,0 +1,43 @@
+
+ T.gcc_linking = { }
+ local suite = T.gcc_linking
+
+ local staticPrj
+ local linksToStaticProj
+
+ function suite.setup()
+ _ACTION = "gmake"
+
+ sln = solution "MySolution"
+ configurations { "Debug" }
+ platforms {}
+
+ staticPrj = project "staticPrj"
+ targetdir 'bar'
+ language 'C++'
+ kind "StaticLib"
+
+ linksToStaticProj = project "linksToStaticProj"
+ language 'C++'
+ kind 'ConsoleApp'
+ links{'staticPrj'}
+ end
+
+ function suite.teardown()
+ staticPrj = nil
+ linksToStaticProj = nil
+ end
+
+ local get_buffer = function()
+ io.capture()
+ premake.buildconfigs()
+ local cfg = premake.getconfig(linksToStaticProj, 'Debug', 'Native')
+ premake.gmake_cpp_config(cfg, premake.gcc)
+ local buffer = io.endcapture()
+ return buffer
+ end
+ function suite.ProjectLinksToStaticPremakeMadeLibrary_linksUsingTheFormat_pathNameExtension()
+ local buffer = get_buffer()
+ local format_exspected = 'LIBS %+%= bar/libstaticPrj.a'
+ test.string_contains(buffer,format_exspected)
+ end
diff --git a/tests/premake4.lua b/tests/premake4.lua
index 83b35ad..be606ae 100644
--- a/tests/premake4.lua
+++ b/tests/premake4.lua
@@ -77,6 +77,7 @@
-- Makefile tests
dofile("actions/make/test_make_escaping.lua")
dofile("actions/make/test_make_pch.lua")
+ dofile("actions/make/test_make_linking.lua")
-- Xcode tests
dofile("actions/xcode/test_xcode_common.lua")