| 1 | package agent |
| 2 | |
| 3 | import ( |
| 4 | "strings" |
| 5 | "testing" |
| 6 | ) |
| 7 | |
| 8 | func TestSubagentResultWarnsOnHostDecisionLanguage(t *testing.T) { |
| 9 | out := GuardSubagentHostDecisionText("等待用户批准后再执行修改") |
| 10 | if !strings.Contains(out, "Subagent boundary") { |
| 11 | t.Fatalf("guarded output missing boundary warning:\n%s", out) |
| 12 | } |
| 13 | plain := "found 3 callers of Foo" |
| 14 | if got := GuardSubagentHostDecisionText(plain); got != plain { |
| 15 | t.Fatalf("plain output changed: %q", got) |
| 16 | } |
| 17 | } |
| 18 |