This repository has been archived on 2022-12-23. You can view files and clone it, but cannot push or open issues or pull requests.
fuck-premake-old2/modules/android/tests/test_android_files.lua
2019-04-04 20:46:07 +04:30

48 lines
738 B
Lua

local p = premake
local suite = test.declare("test_android_files")
local vc2010 = p.vstudio.vc2010
--
-- Setup
--
local wks, prj
function suite.setup()
p.action.set("vs2015")
wks = test.createWorkspace()
end
local function prepare()
prj = test.getproject(wks, 1)
system "android"
vc2010.files(prj)
end
--
-- Test filtering of source files into the correct categories.
--
function suite.none_onJavaFile()
files { "hello.java" }
prepare()
test.capture [[
<ItemGroup>
<None Include="hello.java" />
</ItemGroup>
]]
end
function suite.javaCompile_onJavaFile()
kind "Packaging"
files { "hello.java" }
prepare()
test.capture [[
<ItemGroup>
<JavaCompile Include="hello.java" />
</ItemGroup>
]]
end