Skip to content

Commit fdf7587

Browse files
committed
Update completion test to normalize line endings
1 parent a1792c6 commit fdf7587

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

omnisharptest/omnisharpIntegrationTests/completionProvider.integration.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ suite(`${OmniSharpCompletionProvider.name}: Returns the completion items`, () =>
9393
sawAdditionalTextEdits = true;
9494
expect(i.additionalTextEdits).to.be.array();
9595
expect(i.additionalTextEdits.length).to.equal(1);
96-
expect(i.additionalTextEdits[0].newText).to.equal('using singleCsproj2;\n');
96+
expect(normalizeNewlines(i.additionalTextEdits[0].newText)).to.equal('using singleCsproj2;\n');
9797
expect(i.additionalTextEdits[0].range.start.line).to.equal(1);
9898
expect(i.additionalTextEdits[0].range.start.character).to.equal(0);
9999
expect(i.additionalTextEdits[0].range.end.line).to.equal(1);
@@ -107,4 +107,10 @@ suite(`${OmniSharpCompletionProvider.name}: Returns the completion items`, () =>
107107
expect(sawAdditionalTextEdits).to.be.true;
108108
expect(sawEmptyAdditionalTextEdits).to.be.true;
109109
});
110+
111+
function normalizeNewlines(text: string) {
112+
// using directives are now added with the line ending used by other
113+
// using directives in the file instead of the formatting option end_of_line.
114+
return text.replaceAll('\r\n', '\n');
115+
}
110116
});

0 commit comments

Comments
 (0)