mirror of
https://github.com/Ed1s0nZ/CyberStrikeAI.git
synced 2026-04-21 18:26:38 +02:00
18 lines
507 B
Go
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)
|
|
}
|
|
}
|