mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-25 04:36:23 +00:00
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:
@@ -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
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user