Skip to content

Commit

Permalink
less commented out test for #10659
Browse files Browse the repository at this point in the history
  • Loading branch information
jrieken committed Jun 18, 2018
1 parent 40df36b commit c93d5e7
Showing 1 changed file with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import * as vscode from 'vscode';
import { createRandomFile, deleteFile, closeAllEditors, pathEquals } from '../utils';
import { join, basename } from 'path';
import * as fs from 'fs';
import { networkInterfaces } from 'os';

suite('workspace-namespace', () => {

Expand Down Expand Up @@ -554,18 +553,18 @@ suite('workspace-namespace', () => {
assert.equal(success, false);
});

// test('applyEdit "edit A -> rename A to B -> edit B"', async () => {
// const oldUri = await createRandomFile();
// const newUri = oldUri.with({ path: oldUri.path + 'NEW' });
// const edit = new vscode.WorkspaceEdit();
// edit.insert(oldUri, new vscode.Position(0, 0), 'BEFORE');
// edit.renameFile(oldUri, newUri);
// edit.insert(newUri, new vscode.Position(0, 0), 'AFTER');
test('applyEdit "edit A -> rename A to B -> edit B"', async () => {
const oldUri = await createRandomFile();
const newUri = oldUri.with({ path: oldUri.path + 'NEW' });
const edit = new vscode.WorkspaceEdit();
edit.insert(oldUri, new vscode.Position(0, 0), 'BEFORE');
edit.renameFile(oldUri, newUri);
edit.insert(newUri, new vscode.Position(0, 0), 'AFTER');

// let success = await vscode.workspace.applyEdit(edit);
// assert.equal(success, true);
let success = await vscode.workspace.applyEdit(edit);
assert.equal(success, true);

// let doc = await vscode.workspace.openTextDocument(newUri);
// assert.equal(doc.getText(), 'AFTERBEFORE');
// });
// let doc = await vscode.workspace.openTextDocument(newUri);
// assert.equal(doc.getText(), 'AFTERBEFORE');
});
});

0 comments on commit c93d5e7

Please sign in to comment.