forked from premake/premake-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_target_rules.lua
57 lines (44 loc) · 983 Bytes
/
test_target_rules.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
--
-- tests/actions/make/cpp/test_target_rules.lua
-- Validate the makefile target building rules.
-- Copyright (c) 2009-2013 Jess Perkins and the Premake project
--
local p = premake
local suite = test.declare("make_cpp_target_rules")
local make = p.makelegacy
local project = p.project
--
-- Setup
--
local wks, prj
function suite.setup()
wks, prj = test.createWorkspace()
end
local function prepare()
local cfg = test.getconfig(prj, "Debug")
make.cppAllRules(cfg)
end
--
-- Check the default, normal format of the rules.
--
function suite.defaultRules()
prepare()
test.capture [[
all: prebuild prelink $(TARGET)
@:
]]
end
--
-- Check rules for an OS X Cocoa application.
--
function suite.osxWindowedAppRules()
system "MacOSX"
kind "WindowedApp"
prepare()
test.capture [[
all: prebuild prelink $(TARGET) $(dir $(TARGETDIR))PkgInfo $(dir $(TARGETDIR))Info.plist
@:
$(dir $(TARGETDIR))PkgInfo:
$(dir $(TARGETDIR))Info.plist:
]]
end