(t *testing.T)
| 178 | } |
| 179 | |
| 180 | func TestWithToolsetsTrimsWhitespace(t *testing.T) { |
| 181 | tools := []ServerTool{ |
| 182 | mockTool("tool1", "toolset1", true), |
| 183 | mockTool("tool2", "toolset2", true), |
| 184 | } |
| 185 | |
| 186 | // Whitespace should be trimmed |
| 187 | filteredReg := mustBuild(t, NewBuilder().SetTools(tools).WithToolsets([]string{" toolset1 ", " toolset2 "})) |
| 188 | filteredTools := filteredReg.AvailableTools(context.Background()) |
| 189 | |
| 190 | if len(filteredTools) != 2 { |
| 191 | t.Fatalf("Expected 2 tools after whitespace trimming, got %d", len(filteredTools)) |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | func TestWithToolsetsDeduplicates(t *testing.T) { |
| 196 | tools := []ServerTool{ |
nothing calls this directly
no test coverage detected