Merge branch 'main' into tyriar/120077

This commit is contained in:
Daniel Imms
2021-12-16 11:34:16 -08:00
committed by GitHub
136 changed files with 1094 additions and 691 deletions

View File

@@ -981,7 +981,7 @@ suite('vscode API - workspace', () => {
assert.strictEqual(document.getText(), expected);
});
test('Should send a single FileWillRenameEvent instead of separate events when moving multiple files at once#111867', async function () {
test('Should send a single FileWillRenameEvent instead of separate events when moving multiple files at once#111867, 1/3', async function () {
const file1 = await createRandomFile();
const file2 = await createRandomFile();
@@ -1008,7 +1008,7 @@ suite('vscode API - workspace', () => {
assert.strictEqual(e.files[1].oldUri.toString(), file2.toString());
});
test('Should send a single FileWillRenameEvent instead of separate events when moving multiple files at once#111867', async function () {
test('Should send a single FileWillRenameEvent instead of separate events when moving multiple files at once#111867, 2/3', async function () {
const event = new Promise<vscode.FileWillCreateEvent>(resolve => {
let sub = vscode.workspace.onWillCreateFiles(e => {
@@ -1032,7 +1032,7 @@ suite('vscode API - workspace', () => {
assert.strictEqual(e.files[1].toString(), file2.toString());
});
test('Should send a single FileWillRenameEvent instead of separate events when moving multiple files at once#111867', async function () {
test('Should send a single FileWillRenameEvent instead of separate events when moving multiple files at once#111867, 3/3', async function () {
const file1 = await createRandomFile();
const file2 = await createRandomFile();

View File

@@ -5,11 +5,12 @@
import * as assert from 'assert';
import { EOL } from 'os';
import * as crypto from 'crypto';
import * as vscode from 'vscode';
import { TestFS } from './memfs';
export function rndName() {
return Math.random().toString(36).replace(/[^a-z]+/g, '').substr(0, 10);
return crypto.randomBytes(8).toString('hex');
}
export const testFs = new TestFS('fake-fs', true);