Adds the missing resource file test on PR #365

This commit is contained in:
Jason Perkins 2015-12-16 19:50:37 -05:00
parent d056c744a7
commit a7fa9b9142
2 changed files with 22 additions and 22 deletions

View File

@ -1774,7 +1774,7 @@
x86 = "MachineX86", x86 = "MachineX86",
x86_64 = "MachineX64", x86_64 = "MachineX64",
} }
if cfg.kind == p.STATICLIB then if cfg.kind == p.STATICLIB and config.hasFile(cfg, path.isresourcefile) then
local value = targetmachine[cfg.architecture] local value = targetmachine[cfg.architecture]
if value ~= nil then if value ~= nil then
m.element("TargetMachine", nil, '%s', value) m.element("TargetMachine", nil, '%s', value)

View File

@ -33,6 +33,7 @@
function suite.emitsOnStaticLibWithX86() function suite.emitsOnStaticLibWithX86()
kind "StaticLib" kind "StaticLib"
architecture "x86" architecture "x86"
files { "hello.rc" }
prepare() prepare()
test.capture [[ test.capture [[
<TargetMachine>MachineX86</TargetMachine> <TargetMachine>MachineX86</TargetMachine>
@ -42,6 +43,7 @@
function suite.emitsOnStaticLibWithX86_64() function suite.emitsOnStaticLibWithX86_64()
kind "StaticLib" kind "StaticLib"
architecture "x86_64" architecture "x86_64"
files { "hello.rc" }
prepare() prepare()
test.capture [[ test.capture [[
<TargetMachine>MachineX64</TargetMachine> <TargetMachine>MachineX64</TargetMachine>
@ -54,34 +56,32 @@
-- Other combinations should NOT emit anything -- Other combinations should NOT emit anything
-- --
function suite.isIgnoredOnConsoleAppNoArch()
kind "ConsoleApp"
prepare()
test.isemptycapture()
end
function suite.isIgnoredOnConsoleAppWithX86()
kind "ConsoleApp"
architecture "x86"
prepare()
test.isemptycapture()
end
function suite.isIgnoredOnStaticLibNoArch() function suite.isIgnoredOnStaticLibNoArch()
kind "StaticLib" kind "StaticLib"
files { "hello.rc" }
prepare() prepare()
test.isemptycapture() test.isemptycapture()
end end
function suite.isIgnoredOnSharedLibNoArch() function suite.isIgnoredOnStaticLibNoResource()
kind "SharedLib" kind "StaticLib"
prepare()
test.isemptycapture()
end
function suite.isIgnoredOnSharedLibWithX86()
kind "SharedLib"
architecture "x86" architecture "x86"
prepare() prepare()
test.isemptycapture() test.isemptycapture()
end end
function suite.isIgnoredOnConsoleApp()
kind "ConsoleApp"
architecture "x86"
files { "hello.rc" }
prepare()
test.isemptycapture()
end
function suite.isIgnoredOnSharedLib()
kind "SharedLib"
architecture "x86"
files { "hello.rc" }
prepare()
test.isemptycapture()
end