Skip to content

Commit c972b16

Browse files
authored
Integration test failure: workspace.applyEdit drops the TextEdit if there is a RenameFile later (fix microsoft#206356) (microsoft#208662)
1 parent 5d8491d commit c972b16

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

extensions/vscode-api-tests/src/singlefolder-tests/workspace.test.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -934,7 +934,7 @@ suite('vscode API - workspace', () => {
934934
async function test77735(withOpenedEditor: boolean): Promise<void> {
935935
const docUriOriginal = await createRandomFile();
936936
const docUriMoved = docUriOriginal.with({ path: `${docUriOriginal.path}.moved` });
937-
await deleteFile(docUriMoved); // ensure target does not exist
937+
await deleteFile(docUriMoved);
938938

939939
if (withOpenedEditor) {
940940
const document = await vscode.workspace.openTextDocument(docUriOriginal);
@@ -967,8 +967,9 @@ suite('vscode API - workspace', () => {
967967
const document = await vscode.workspace.openTextDocument(newUri);
968968
assert.strictEqual(document.isDirty, true);
969969

970-
await document.save();
971-
assert.strictEqual(document.isDirty, false);
970+
const result = await document.save();
971+
assert.strictEqual(result, true, `save failed in iteration: ${i} (docUriOriginal: ${docUriOriginal.fsPath})`);
972+
assert.strictEqual(document.isDirty, false, `document still dirty in iteration: ${i} (docUriOriginal: ${docUriOriginal.fsPath})`);
972973

973974
assert.strictEqual(document.getText(), expected);
974975

0 commit comments

Comments
 (0)