Skip to content

Commit a1323ff

Browse files
committed
Revert "slash, backslash fun"
This reverts commit 25d37c7.
1 parent 25d37c7 commit a1323ff

1 file changed

Lines changed: 4 additions & 13 deletions

File tree

src/vs/workbench/test/node/api/extHostWorkspace.test.ts

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,39 +5,30 @@
55

66
'use strict';
77

8-
import { isWindows } from 'vs/base/common/platform';
98
import * as assert from 'assert';
109
import { ExtHostWorkspace } from 'vs/workbench/api/node/extHostWorkspace';
1110
import { TestThreadService } from './testThreadService';
1211

1312
suite('ExtHostWorkspace', function () {
1413

15-
function fsPath(path: string): string {
16-
if (isWindows) {
17-
return path.replace(/\//g, '\\');
18-
} else {
19-
return path;
20-
}
21-
}
22-
2314
test('asRelativePath', function () {
2415

2516
const ws = new ExtHostWorkspace(new TestThreadService(), '/Coding/Applications/NewsWoWBot');
2617

27-
assert.equal(ws.getRelativePath('/Coding/Applications/NewsWoWBot/bernd/das/brot'), fsPath('bernd/das/brot'));
18+
assert.equal(ws.getRelativePath('/Coding/Applications/NewsWoWBot/bernd/das/brot'), 'bernd/das/brot');
2819
assert.equal(ws.getRelativePath('/Apps/DartPubCache/hosted/pub.dartlang.org/convert-2.0.1/lib/src/hex.dart'),
29-
fsPath('/Apps/DartPubCache/hosted/pub.dartlang.org/convert-2.0.1/lib/src/hex.dart'));
20+
'/Apps/DartPubCache/hosted/pub.dartlang.org/convert-2.0.1/lib/src/hex.dart');
3021

3122
assert.equal(ws.getRelativePath(''), '');
32-
assert.equal(ws.getRelativePath('/foo/bar'), fsPath('/foo/bar'));
23+
assert.equal(ws.getRelativePath('/foo/bar'), '/foo/bar');
3324
});
3425

3526
test('asRelativePath, same paths, #11402', function () {
3627
const root = '/home/aeschli/workspaces/samples/docker';
3728
const input = '/home/aeschli/workspaces/samples/docker';
3829
const ws = new ExtHostWorkspace(new TestThreadService(), root);
3930

40-
assert.equal(ws.getRelativePath(input), fsPath(input));
31+
assert.equal(ws.getRelativePath(input), input);
4132

4233
const input2 = '/home/aeschli/workspaces/samples/docker/a.file';
4334
assert.equal(ws.getRelativePath(input2), 'a.file');

0 commit comments

Comments
 (0)