Add rename/create/delete file to workspaced edit

Fixes #10659

Allows workspace edits to also change files in the workspace
This commit is contained in:
Matt Bierner
2018-01-10 14:26:43 -08:00
parent 05b667d5a2
commit e932b8ad9c
13 changed files with 304 additions and 23 deletions

View File

@@ -505,4 +505,18 @@ suite('workspace-namespace', () => {
return vscode.workspace.applyEdit(edit);
});
});
test('applyEdit should fail when editing deleted resource', async () => {
const resource = await createRandomFile();
let edit = new vscode.WorkspaceEdit();
edit.deleteResource(resource);
try {
edit.insert(resource, new vscode.Position(0, 0), '');
assert.fail(false, 'Should disallow edit of deleted resource');
} catch {
// noop
}
});
});