diff options
| author | ruki <[email protected]> | 2018-05-02 22:45:34 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-05-02 10:33:27 +0800 |
| commit | d1db6a9b8cc657ea5b3fc1cddb52d3b351639680 (patch) | |
| tree | eb5671429d48701afa6a6adad829d344f80b9c73 /tests | |
| parent | 36e4d8e69cdf7019485d5328810fe1c5720bad5d (diff) | |
modify rule tests
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/apis/rules/xmake.lua | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/apis/rules/xmake.lua b/tests/apis/rules/xmake.lua index 25640965c..712a055ef 100644 --- a/tests/apis/rules/xmake.lua +++ b/tests/apis/rules/xmake.lua @@ -117,6 +117,18 @@ rule("stub1") print("rule(stub1): after_run") end) +-- define rule: stub0b +rule("stub0b") + before_build_file(function (target, sourcefile) + print("rule(stub0b): before_build_file", sourcefile) + end) + +-- define rule: stub0a +rule("stub0a") + after_build_file(function (target, sourcefile) + print("rule(stub0a): after_build_file", sourcefile) + end) + -- define target target("test") @@ -127,7 +139,7 @@ target("test") add_rules("stub1") -- add files - add_files("src/*.c") + add_files("src/*.c", {rules = {"stub0a", "stub0b"}}) add_files("src/man/*.in", {rule = "man"}) add_files("src/index.md") add_files("src/test.c.in", {rule = "c code"}) |
