Skip to content

Commit 5e4f077

Browse files
committed
fix(operation-docs): normalize line endings in test extractors
1 parent 1b639d6 commit 5e4f077

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

pkg/mcp/builders/kafka/operation_docs_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ func extractGeneratedOperationBlock(t *testing.T, content string) string {
7171
end := strings.Index(content[start:], endMarker)
7272
require.NotEqual(t, -1, end, "missing generated operation end marker")
7373
end += start + len(endMarker)
74-
return strings.TrimSpace(content[start:end])
74+
block := strings.TrimSpace(content[start:end])
75+
return strings.ReplaceAll(block, "\r\n", "\n")
7576
}
7677

7778
func formatOperationNames(operations []string) string {

pkg/mcp/builders/pulsar/operation_docs_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@ func extractGeneratedOperationBlock(t *testing.T, content string) string {
8181
end := strings.Index(content[start:], endMarker)
8282
require.NotEqual(t, -1, end, "missing generated operation end marker")
8383
end += start + len(endMarker)
84-
return strings.TrimSpace(content[start:end])
84+
block := strings.TrimSpace(content[start:end])
85+
return strings.ReplaceAll(block, "\r\n", "\n")
8586
}
8687

8788
func formatOperationNames(operations []string) string {

0 commit comments

Comments
 (0)