(t *testing.T)
| 252 | } |
| 253 | |
| 254 | func TestRecoverFromTextDeduplicates(t *testing.T) { |
| 255 | tools := []official.Tool{ |
| 256 | {Type: "function", Function: official.ToolFunction{Name: "x", Parameters: json.RawMessage(`{}`)}}, |
| 257 | } |
| 258 | text := `{"name":"x","arguments":{"a":1}} {"name":"x","arguments":{"a":1}}` |
| 259 | calls := RecoverFromText(text, tools) |
| 260 | if len(calls) != 1 { |
| 261 | t.Fatalf("calls = %d, want 1 dedup", len(calls)) |
| 262 | } |
| 263 | } |
| 264 | |
| 265 | func TestShellCmdToString(t *testing.T) { |
| 266 | cases := []struct { |
nothing calls this directly
no test coverage detected