mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-09 16:24:45 +01:00
5455d20ce1
* debt - adopt `ensureNoDisposablesAreLeakedInTestSuite` in more tests * . * . * .
25 lines
1.1 KiB
TypeScript
25 lines
1.1 KiB
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* 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 { URI } from 'vs/base/common/uri';
|
|
import { originalFSPath } from 'vs/base/common/resources';
|
|
import { isWindows } from 'vs/base/common/platform';
|
|
import { ensureNoDisposablesAreLeakedInTestSuite } from 'vs/base/test/common/utils';
|
|
|
|
suite('ExtHost API', function () {
|
|
test('issue #51387: originalFSPath', function () {
|
|
if (isWindows) {
|
|
assert.strictEqual(originalFSPath(URI.file('C:\\test')).charAt(0), 'C');
|
|
assert.strictEqual(originalFSPath(URI.file('c:\\test')).charAt(0), 'c');
|
|
|
|
assert.strictEqual(originalFSPath(URI.revive(JSON.parse(JSON.stringify(URI.file('C:\\test'))))).charAt(0), 'C');
|
|
assert.strictEqual(originalFSPath(URI.revive(JSON.parse(JSON.stringify(URI.file('c:\\test'))))).charAt(0), 'c');
|
|
}
|
|
});
|
|
|
|
ensureNoDisposablesAreLeakedInTestSuite();
|
|
});
|