(t *testing.T)
| 193 | } |
| 194 | |
| 195 | func TestWithToolsetsDeduplicates(t *testing.T) { |
| 196 | tools := []ServerTool{ |
| 197 | mockTool("tool1", "toolset1", true), |
| 198 | } |
| 199 | |
| 200 | // Duplicates should be removed |
| 201 | filteredReg := mustBuild(t, NewBuilder().SetTools(tools).WithToolsets([]string{"toolset1", "toolset1", " toolset1 "})) |
| 202 | filteredTools := filteredReg.AvailableTools(context.Background()) |
| 203 | |
| 204 | if len(filteredTools) != 1 { |
| 205 | t.Fatalf("Expected 1 tool after deduplication, got %d", len(filteredTools)) |
| 206 | } |
| 207 | } |
| 208 | |
| 209 | func TestWithToolsetsIgnoresEmptyStrings(t *testing.T) { |
| 210 | tools := []ServerTool{ |
nothing calls this directly
no test coverage detected