Files
CyberStrikeAI/internal/multiagent/plan_execute_text_test.go
T
2026-04-19 03:24:28 +08:00

18 lines
507 B
Go

package multiagent
import "testing"
func TestUnwrapPlanExecuteUserText(t *testing.T) {
raw := `{"response": "你好!很高兴见到你。"}`
if got := UnwrapPlanExecuteUserText(raw); got != "你好!很高兴见到你。" {
t.Fatalf("got %q", got)
}
if got := UnwrapPlanExecuteUserText("plain"); got != "plain" {
t.Fatalf("got %q", got)
}
steps := `{"steps":["a","b"]}`
if got := UnwrapPlanExecuteUserText(steps); got != steps {
t.Fatalf("expected unchanged steps json, got %q", got)
}
}