diff options
| author | ruki <[email protected]> | 2026-08-11 23:45:05 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-08-11 23:45:05 +0800 |
| commit | 7ffcc9f8e2a98d63f7f6880b9a3e4553439583c6 (patch) | |
| tree | f2bf7c4e0e9806fd157cc3243a45f691fd282988 /tests/actions/addon/custom-plugin/plugins/hello_addon | |
| parent | 9e6abef8b0a26d7098d79749dd68b5a2590512c4 (diff) | |
add global modules and rewrite addon tests
Diffstat (limited to 'tests/actions/addon/custom-plugin/plugins/hello_addon')
| -rw-r--r-- | tests/actions/addon/custom-plugin/plugins/hello_addon/main.lua | 5 | ||||
| -rw-r--r-- | tests/actions/addon/custom-plugin/plugins/hello_addon/xmake.lua | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/actions/addon/custom-plugin/plugins/hello_addon/main.lua b/tests/actions/addon/custom-plugin/plugins/hello_addon/main.lua new file mode 100644 index 000000000..0cf3a0386 --- /dev/null +++ b/tests/actions/addon/custom-plugin/plugins/hello_addon/main.lua @@ -0,0 +1,5 @@ +import("core.base.option") + +function main() + print("hello from custom-plugin: %s", option.get("name") or "world") +end diff --git a/tests/actions/addon/custom-plugin/plugins/hello_addon/xmake.lua b/tests/actions/addon/custom-plugin/plugins/hello_addon/xmake.lua new file mode 100644 index 000000000..7976a1d0e --- /dev/null +++ b/tests/actions/addon/custom-plugin/plugins/hello_addon/xmake.lua @@ -0,0 +1,5 @@ +task("hello_addon") + set_category("plugin") + set_menu {usage = "xmake hello_addon", description = "Say hello from the addon.", + options = {{'n', "name", "kv", nil, "Set the name."}}} + on_run("main") |
