mirror of
https://github.com/microsoft/vscode.git
synced 2026-10-05 15:36:22 +01:00
add test ensuring getWorkspaceFolder doesn't fail on drive letter casing, #36221
This commit is contained in:
1 parent
4b782829aa
commit
9ee20ac2d8
1 file changed
+11
@@ -212,6 +212,17 @@ suite('ExtHostWorkspace', function () {
|
||||
sub.dispose();
|
||||
});
|
||||
|
||||
test('`vscode.workspace.getWorkspaceFolder(file)` don\'t return workspace folder when file open from command line. #36221', function () {
|
||||
let ws = new ExtHostWorkspace(new TestThreadService(), {
|
||||
id: 'foo', name: 'Test', folders: [
|
||||
aWorkspaceFolderData(URI.file('c:/Users/marek/Desktop/vsc_test/'), 0)
|
||||
]
|
||||
});
|
||||
|
||||
assert.ok(ws.getWorkspaceFolder(URI.file('c:/Users/marek/Desktop/vsc_test/a.txt')));
|
||||
assert.ok(ws.getWorkspaceFolder(URI.file('C:/Users/marek/Desktop/vsc_test/b.txt')));
|
||||
});
|
||||
|
||||
function aWorkspaceFolderData(uri: URI, index: number, name: string = ''): IWorkspaceFolderData {
|
||||
return {
|
||||
uri,
|
||||
|
||||
Reference in new issue
Block a user