diff options
| author | ruki <[email protected]> | 2020-04-22 22:37:38 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-04-22 09:45:50 +0800 |
| commit | 56d0939297f81d8a6790e4b638ff516e4a6c3e08 (patch) | |
| tree | 33d2901ba9cfe03ad19aae394c511d3d8b6bbb48 /tests/projects/xmake_cli/hello/src | |
| parent | 15dc39430ed49d42709bba3ef2acab8500414a3a (diff) | |
add xmake_cli/hello test
Diffstat (limited to 'tests/projects/xmake_cli/hello/src')
| -rw-r--r-- | tests/projects/xmake_cli/hello/src/lni/main.c | 17 | ||||
| -rw-r--r-- | tests/projects/xmake_cli/hello/src/lua/main.lua | 3 |
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/projects/xmake_cli/hello/src/lni/main.c b/tests/projects/xmake_cli/hello/src/lni/main.c new file mode 100644 index 000000000..6e75791ed --- /dev/null +++ b/tests/projects/xmake_cli/hello/src/lni/main.c @@ -0,0 +1,17 @@ +#include <xmake/xmake.h> + +tb_int_t main(tb_int_t argc, tb_char_t** argv) +{ + tb_int_t ok = -1; + if (xm_init()) + { + xm_engine_ref_t engine = xm_engine_init(); + if (engine) + { + ok = xm_engine_main(engine, argc, argv); + xm_engine_exit(engine); + } + xm_exit(); + } + return ok; +} diff --git a/tests/projects/xmake_cli/hello/src/lua/main.lua b/tests/projects/xmake_cli/hello/src/lua/main.lua new file mode 100644 index 000000000..f83baddf8 --- /dev/null +++ b/tests/projects/xmake_cli/hello/src/lua/main.lua @@ -0,0 +1,3 @@ +function main () + print("hello xmake!") +end |
