summaryrefslogtreecommitdiff
path: root/tests/projects/xmake_cli/ide_integration/assets/targets.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2025-02-06 23:18:49 +0800
committerruki <[email protected]>2025-02-06 23:18:49 +0800
commit378ce254ca617f0d2772be7d7acd4ccc2428aef1 (patch)
tree9891afda469a25a21b8d5b7c3e795c7d071fc653 /tests/projects/xmake_cli/ide_integration/assets/targets.lua
parent6eaa4760792b4edf26ad9dc271225cf7b83d7633 (diff)
add ide integration test
Diffstat (limited to 'tests/projects/xmake_cli/ide_integration/assets/targets.lua')
-rw-r--r--tests/projects/xmake_cli/ide_integration/assets/targets.lua22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/projects/xmake_cli/ide_integration/assets/targets.lua b/tests/projects/xmake_cli/ide_integration/assets/targets.lua
new file mode 100644
index 000000000..87800392f
--- /dev/null
+++ b/tests/projects/xmake_cli/ide_integration/assets/targets.lua
@@ -0,0 +1,22 @@
+-- imports
+import("core.project.config")
+import("core.project.project")
+import("core.base.json")
+
+function main ()
+ config.load()
+
+ local names = {}
+ for name, _ in pairs((project.targets())) do
+ table.insert(names, name)
+ end
+ table.sort(names)
+ if json.mark_as_array then
+ json.mark_as_array(names)
+ end
+ local localjson = json.encode(names)
+
+ print("__begin__")
+ print(localjson)
+ print("__end__")
+end