mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 00:28:52 +01:00
Initial work on rename in markdown
For #146291 Also fixes references triggered on a definition link
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
import * as assert from 'assert';
|
||||
import * as os from 'os';
|
||||
import * as vscode from 'vscode';
|
||||
import { InMemoryDocument } from '../util/inMemoryDocument';
|
||||
@@ -35,3 +36,10 @@ export function getCursorPositions(contents: string, doc: InMemoryDocument): vsc
|
||||
export function workspacePath(...segments: string[]): vscode.Uri {
|
||||
return vscode.Uri.joinPath(vscode.workspace.workspaceFolders![0].uri, ...segments);
|
||||
}
|
||||
|
||||
export function assertRangeEqual(expected: vscode.Range, actual: vscode.Range, message?: string) {
|
||||
assert.strictEqual(expected.start.line, actual.start.line, message);
|
||||
assert.strictEqual(expected.start.character, actual.start.character, message);
|
||||
assert.strictEqual(expected.end.line, actual.end.line, message);
|
||||
assert.strictEqual(expected.end.character, actual.end.character, message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user