提交 62d4b783 编写于 作者: D Dirk Baeumer

Merged in PR #11128

上级 39e53986
......@@ -49,6 +49,10 @@ export class ConfigurationResolverService implements IConfigurationResolverServi
return this._workspaceRoot;
}
private get workspaceRootFolderName(): string {
return this.workspaceRoot ? paths.basename(this.workspaceRoot) : '';
}
private get file(): string {
return this.getFilePath();
}
......
......@@ -36,6 +36,10 @@ suite('Configuration Resolver Service', () => {
}
});
test('workspace root folder name', () => {
assert.strictEqual(configurationResolverService.resolve('abc ${workspaceRootFolderName} xyz'), 'abc workspaceLocation xyz');
});
test('substitute many', () => {
if (platform.isWindows) {
assert.strictEqual(configurationResolverService.resolve('${workspaceRoot} - ${workspaceRoot}'), '\\VSCode\\workspaceLocation - \\VSCode\\workspaceLocation');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册