refactor: stabilize runtime and unify config

This commit is contained in:
lpf
2026-03-14 21:40:12 +08:00
parent 60eee65fec
commit 341e578c9f
75 changed files with 3081 additions and 1627 deletions

View File

@@ -0,0 +1,23 @@
package tools
import "testing"
func TestMapObjectArgReturnsEmptyMapForMissingValue(t *testing.T) {
t.Parallel()
got := MapObjectArg(nil, "arguments")
if got == nil || len(got) != 0 {
t.Fatalf("expected empty map, got %#v", got)
}
}
func TestMapObjectArgReturnsObjectValue(t *testing.T) {
t.Parallel()
got := MapObjectArg(map[string]interface{}{
"arguments": map[string]interface{}{"path": "README.md"},
}, "arguments")
if got["path"] != "README.md" {
t.Fatalf("unexpected object arg: %#v", got)
}
}