summaryrefslogtreecommitdiff
path: root/tests/projects
diff options
context:
space:
mode:
authorruki <[email protected]>2026-04-18 21:52:57 +0800
committerruki <[email protected]>2026-04-20 09:35:36 +0800
commitfea8ad3d654e497ba83315f26902647dd64f561e (patch)
tree7576a6c7b0005da49bc381769af96fabb038f11c /tests/projects
parent51be800bddfa199774206393cb8d7e0749f59756 (diff)
add --dot output
Diffstat (limited to 'tests/projects')
-rw-r--r--tests/projects/plugins/show/depgraph/src/core.c1
-rw-r--r--tests/projects/plugins/show/depgraph/src/main.c1
-rw-r--r--tests/projects/plugins/show/depgraph/src/ui.c1
-rw-r--r--tests/projects/plugins/show/depgraph/test.lua33
-rw-r--r--tests/projects/plugins/show/depgraph/xmake.lua15
5 files changed, 0 insertions, 51 deletions
diff --git a/tests/projects/plugins/show/depgraph/src/core.c b/tests/projects/plugins/show/depgraph/src/core.c
deleted file mode 100644
index 87a413095..000000000
--- a/tests/projects/plugins/show/depgraph/src/core.c
+++ /dev/null
@@ -1 +0,0 @@
-int core(void) { return 0; }
diff --git a/tests/projects/plugins/show/depgraph/src/main.c b/tests/projects/plugins/show/depgraph/src/main.c
deleted file mode 100644
index 78f2de106..000000000
--- a/tests/projects/plugins/show/depgraph/src/main.c
+++ /dev/null
@@ -1 +0,0 @@
-int main(void) { return 0; }
diff --git a/tests/projects/plugins/show/depgraph/src/ui.c b/tests/projects/plugins/show/depgraph/src/ui.c
deleted file mode 100644
index c15794f4d..000000000
--- a/tests/projects/plugins/show/depgraph/src/ui.c
+++ /dev/null
@@ -1 +0,0 @@
-int ui(void) { return 0; }
diff --git a/tests/projects/plugins/show/depgraph/test.lua b/tests/projects/plugins/show/depgraph/test.lua
deleted file mode 100644
index 229e715de..000000000
--- a/tests/projects/plugins/show/depgraph/test.lua
+++ /dev/null
@@ -1,33 +0,0 @@
-import("core.base.json")
-
-function test_depgraph_json(t)
- local outdata = os.iorunv("xmake", {"show", "--info=depgraph", "--json"})
- local graph = json.decode(outdata)
-
- t:are_equal(graph.root_targets, {"app"})
- t:require(#graph.targets == 3)
-
- local entries = {}
- for _, target in ipairs(graph.targets) do
- entries[target.name] = target
- end
- t:are_equal(entries.core.deps, {})
- t:are_equal(entries.core.kind, "static")
- t:are_equal(entries.ui.deps, {"core"})
- t:are_equal(entries.app.deps, {"core", "ui"})
- t:are_equal(entries.app.kind, "binary")
-end
-
-function test_depgraph_json_for_single_target(t)
- local outdata = os.iorunv("xmake", {"show", "--info=depgraph", "--target=app", "--json"})
- local graph = json.decode(outdata)
-
- t:are_equal(graph.root_targets, {"app"})
- t:require(#graph.targets == 3)
-
- local names = {}
- for _, target in ipairs(graph.targets) do
- table.insert(names, target.name)
- end
- t:are_equal(names, {"core", "ui", "app"})
-end
diff --git a/tests/projects/plugins/show/depgraph/xmake.lua b/tests/projects/plugins/show/depgraph/xmake.lua
deleted file mode 100644
index 7077424f3..000000000
--- a/tests/projects/plugins/show/depgraph/xmake.lua
+++ /dev/null
@@ -1,15 +0,0 @@
-add_rules("mode.debug", "mode.release")
-
-target("core")
- set_kind("static")
- add_files("src/core.c")
-
-target("ui")
- set_kind("static")
- add_deps("core")
- add_files("src/ui.c")
-
-target("app")
- set_kind("binary")
- add_deps("core", "ui")
- add_files("src/main.c")