forked from devcontainers/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlabelPathNormalization.test.ts
More file actions
29 lines (25 loc) · 1014 Bytes
/
labelPathNormalization.test.ts
File metadata and controls
29 lines (25 loc) · 1014 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
*--------------------------------------------------------------------------------------------*/
import { assert } from 'chai';
import { normalizeDevContainerLabelPath } from '../spec-node/utils';
describe('normalizeDevContainerLabelPath', function () {
it('lowercases Windows drive letters', function () {
assert.equal(
normalizeDevContainerLabelPath('win32', 'C:\\CodeBlocks\\remill'),
'c:\\CodeBlocks\\remill'
);
});
it('normalizes Windows path separators', function () {
assert.equal(
normalizeDevContainerLabelPath('win32', 'C:/CodeBlocks/remill/.devcontainer/devcontainer.json'),
'c:\\CodeBlocks\\remill\\.devcontainer\\devcontainer.json'
);
});
it('leaves non-Windows paths unchanged', function () {
assert.equal(
normalizeDevContainerLabelPath('linux', '/workspaces/remill'),
'/workspaces/remill'
);
});
});