summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2017-09-18 22:54:45 +0800
committerruki <[email protected]>2017-09-18 11:28:30 +0800
commit48e86182ee1b3a73f5c16e2fbb2fdebfe5c75d89 (patch)
treedae15773df281be43faf28aed10e28b53df89f2e
parent8f55f2e39ae47b7e9bc206d5ddf62a99d25c9d0f (diff)
add add_imports tests
-rw-r--r--tests/apis/add_imports/test.lua3
-rw-r--r--tests/apis/add_imports/xmake.lua16
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/apis/add_imports/test.lua b/tests/apis/add_imports/test.lua
new file mode 100644
index 000000000..a4a38b0ce
--- /dev/null
+++ b/tests/apis/add_imports/test.lua
@@ -0,0 +1,3 @@
+function main()
+ os.exec("xmake")
+end
diff --git a/tests/apis/add_imports/xmake.lua b/tests/apis/add_imports/xmake.lua
new file mode 100644
index 000000000..b960360cf
--- /dev/null
+++ b/tests/apis/add_imports/xmake.lua
@@ -0,0 +1,16 @@
+target("test")
+
+ add_imports("core.base.option", "core.base.task")
+ before_build(function (target)
+ assert(option)
+ assert(task)
+ end)
+ on_build(function (target)
+ assert(option)
+ assert(task)
+ end)
+ after_build(function (target)
+ assert(option)
+ assert(task)
+ end)
+