mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 00:28:52 +01:00
Fix #55612 - fix findTextInFiles cancellation
This commit is contained in:
@@ -520,6 +520,16 @@ suite('workspace-namespace', () => {
|
||||
assert.equal(vscode.workspace.asRelativePath(results[0].uri), '10linefile.ts');
|
||||
});
|
||||
|
||||
test('findTextInFiles, cancellation', async () => {
|
||||
const results: vscode.TextSearchResult[] = [];
|
||||
const cancellation = new vscode.CancellationTokenSource();
|
||||
cancellation.cancel();
|
||||
|
||||
await vscode.workspace.findTextInFiles({ pattern: 'foo' }, result => {
|
||||
results.push(result);
|
||||
}, cancellation.token);
|
||||
});
|
||||
|
||||
test('applyEdit', () => {
|
||||
|
||||
return vscode.workspace.openTextDocument(vscode.Uri.parse('untitled:' + join(vscode.workspace.rootPath || '', './new2.txt'))).then(doc => {
|
||||
|
||||
Reference in New Issue
Block a user