feat(command-test): migrate to test-lib (manifest.lib + run_tests) (Test-Opt Phase 3.5)

Per ADR-0037 Tests-as-Libs Convention. Renamed on Gitea + moved
locally. History preserved.
This commit is contained in:
Axel Meyer
2026-05-16 01:23:02 +02:00
parent 4a05962f00
commit 1f01f2a6f4
3 changed files with 16 additions and 13 deletions

View File

@@ -4,7 +4,9 @@
local command = require("lib-core.command")
local T = engine.test
function init(ctx)
local M = {}
function M.run_tests(ctx)
-- Mocked-Unit Helper: closure-state simulates a module's unit-state.
local function make_unit(x0, y0, speed)
local state = { x = x0, y = y0 }
@@ -85,3 +87,5 @@ function init(ctx)
local ok2 = pcall(function() command.move_to({99999}, 0, 0) end)
T.assert(not ok2, "move_to with unknown handle errors")
end
return M

11
manifest.lib Normal file
View File

@@ -0,0 +1,11 @@
{
"id": "lib-core.command-test",
"role": "test",
"version": "0.1.0",
"api_min": "0.1",
"deps": [
{"id": "lib-core.command", "version": "0.1.0"},
{"id": "lib-core.input", "version": "0.4.0"},
{"id": "lib-core.camera", "version": "0.3.0"}
]
}

View File

@@ -1,12 +0,0 @@
{
"id": "lib-core.command-test",
"version": "0.1.0",
"kind": "test-module",
"api": "^0.1",
"entry_point": "init.lua",
"deps": [
{ "id": "lib-core.command", "version": "0.1.0" },
{ "id": "lib-core.input", "version": "0.4.0" },
{ "id": "lib-core.camera", "version": "0.3.0" }
]
}