|
|
|
|
@@ -1161,21 +1161,21 @@ suite.skip('WorkspaceConfigurationService-Multiroot', () => { // {{SQL CARBON ED
|
|
|
|
|
|
|
|
|
|
test('application settings are not read from workspace', () => {
|
|
|
|
|
fs.writeFileSync(globalSettingsFile, '{ "configurationService.workspace.applicationSetting": "userValue" }');
|
|
|
|
|
return jsonEditingServce.write(workspaceContextService.getWorkspace().configuration!, { key: 'settings', value: { 'configurationService.workspace.applicationSetting': 'workspaceValue' } }, true)
|
|
|
|
|
return jsonEditingServce.write(workspaceContextService.getWorkspace().configuration!, [{ key: 'settings', value: { 'configurationService.workspace.applicationSetting': 'workspaceValue' } }], true)
|
|
|
|
|
.then(() => testObject.reloadConfiguration())
|
|
|
|
|
.then(() => assert.equal(testObject.getValue('configurationService.workspace.applicationSetting'), 'userValue'));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
test('machine settings are not read from workspace', () => {
|
|
|
|
|
fs.writeFileSync(globalSettingsFile, '{ "configurationService.workspace.machineSetting": "userValue" }');
|
|
|
|
|
return jsonEditingServce.write(workspaceContextService.getWorkspace().configuration!, { key: 'settings', value: { 'configurationService.workspace.machineSetting': 'workspaceValue' } }, true)
|
|
|
|
|
return jsonEditingServce.write(workspaceContextService.getWorkspace().configuration!, [{ key: 'settings', value: { 'configurationService.workspace.machineSetting': 'workspaceValue' } }], true)
|
|
|
|
|
.then(() => testObject.reloadConfiguration())
|
|
|
|
|
.then(() => assert.equal(testObject.getValue('configurationService.workspace.machineSetting'), 'userValue'));
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
test('workspace settings override user settings after defaults are registered ', () => {
|
|
|
|
|
fs.writeFileSync(globalSettingsFile, '{ "configurationService.workspace.newSetting": "userValue" }');
|
|
|
|
|
return jsonEditingServce.write(workspaceContextService.getWorkspace().configuration!, { key: 'settings', value: { 'configurationService.workspace.newSetting': 'workspaceValue' } }, true)
|
|
|
|
|
return jsonEditingServce.write(workspaceContextService.getWorkspace().configuration!, [{ key: 'settings', value: { 'configurationService.workspace.newSetting': 'workspaceValue' } }], true)
|
|
|
|
|
.then(() => testObject.reloadConfiguration())
|
|
|
|
|
.then(() => {
|
|
|
|
|
configurationRegistry.registerConfiguration({
|
|
|
|
|
@@ -1194,7 +1194,7 @@ suite.skip('WorkspaceConfigurationService-Multiroot', () => { // {{SQL CARBON ED
|
|
|
|
|
|
|
|
|
|
test('workspace settings override user settings after defaults are registered for machine overridable settings ', () => {
|
|
|
|
|
fs.writeFileSync(globalSettingsFile, '{ "configurationService.workspace.newMachineOverridableSetting": "userValue" }');
|
|
|
|
|
return jsonEditingServce.write(workspaceContextService.getWorkspace().configuration!, { key: 'settings', value: { 'configurationService.workspace.newMachineOverridableSetting': 'workspaceValue' } }, true)
|
|
|
|
|
return jsonEditingServce.write(workspaceContextService.getWorkspace().configuration!, [{ key: 'settings', value: { 'configurationService.workspace.newMachineOverridableSetting': 'workspaceValue' } }], true)
|
|
|
|
|
.then(() => testObject.reloadConfiguration())
|
|
|
|
|
.then(() => {
|
|
|
|
|
configurationRegistry.registerConfiguration({
|
|
|
|
|
@@ -1268,7 +1268,7 @@ suite.skip('WorkspaceConfigurationService-Multiroot', () => { // {{SQL CARBON ED
|
|
|
|
|
|
|
|
|
|
test('resource setting in folder is read after it is registered later', () => {
|
|
|
|
|
fs.writeFileSync(workspaceContextService.getWorkspace().folders[0].toResource('.vscode/settings.json').fsPath, '{ "configurationService.workspace.testNewResourceSetting2": "workspaceFolderValue" }');
|
|
|
|
|
return jsonEditingServce.write(workspaceContextService.getWorkspace().configuration!, { key: 'settings', value: { 'configurationService.workspace.testNewResourceSetting2': 'workspaceValue' } }, true)
|
|
|
|
|
return jsonEditingServce.write(workspaceContextService.getWorkspace().configuration!, [{ key: 'settings', value: { 'configurationService.workspace.testNewResourceSetting2': 'workspaceValue' } }], true)
|
|
|
|
|
.then(() => testObject.reloadConfiguration())
|
|
|
|
|
.then(() => {
|
|
|
|
|
configurationRegistry.registerConfiguration({
|
|
|
|
|
@@ -1288,7 +1288,7 @@ suite.skip('WorkspaceConfigurationService-Multiroot', () => { // {{SQL CARBON ED
|
|
|
|
|
|
|
|
|
|
test('machine overridable setting in folder is read after it is registered later', () => {
|
|
|
|
|
fs.writeFileSync(workspaceContextService.getWorkspace().folders[0].toResource('.vscode/settings.json').fsPath, '{ "configurationService.workspace.testNewMachineOverridableSetting2": "workspaceFolderValue" }');
|
|
|
|
|
return jsonEditingServce.write(workspaceContextService.getWorkspace().configuration!, { key: 'settings', value: { 'configurationService.workspace.testNewMachineOverridableSetting2': 'workspaceValue' } }, true)
|
|
|
|
|
return jsonEditingServce.write(workspaceContextService.getWorkspace().configuration!, [{ key: 'settings', value: { 'configurationService.workspace.testNewMachineOverridableSetting2': 'workspaceValue' } }], true)
|
|
|
|
|
.then(() => testObject.reloadConfiguration())
|
|
|
|
|
.then(() => {
|
|
|
|
|
configurationRegistry.registerConfiguration({
|
|
|
|
|
@@ -1331,7 +1331,7 @@ suite.skip('WorkspaceConfigurationService-Multiroot', () => { // {{SQL CARBON ED
|
|
|
|
|
assert.equal(actual.workspaceFolder, undefined);
|
|
|
|
|
assert.equal(actual.value, 'userValue');
|
|
|
|
|
|
|
|
|
|
return jsonEditingServce.write(workspaceContextService.getWorkspace().configuration!, { key: 'settings', value: { 'configurationService.workspace.testResourceSetting': 'workspaceValue' } }, true)
|
|
|
|
|
return jsonEditingServce.write(workspaceContextService.getWorkspace().configuration!, [{ key: 'settings', value: { 'configurationService.workspace.testResourceSetting': 'workspaceValue' } }], true)
|
|
|
|
|
.then(() => testObject.reloadConfiguration())
|
|
|
|
|
.then(() => {
|
|
|
|
|
actual = testObject.inspect('configurationService.workspace.testResourceSetting');
|
|
|
|
|
@@ -1373,7 +1373,7 @@ suite.skip('WorkspaceConfigurationService-Multiroot', () => { // {{SQL CARBON ED
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
};
|
|
|
|
|
return jsonEditingServce.write(workspaceContextService.getWorkspace().configuration!, { key: 'launch', value: expectedLaunchConfiguration }, true)
|
|
|
|
|
return jsonEditingServce.write(workspaceContextService.getWorkspace().configuration!, [{ key: 'launch', value: expectedLaunchConfiguration }], true)
|
|
|
|
|
.then(() => testObject.reloadConfiguration())
|
|
|
|
|
.then(() => {
|
|
|
|
|
const actual = testObject.getValue('launch');
|
|
|
|
|
@@ -1398,7 +1398,7 @@ suite.skip('WorkspaceConfigurationService-Multiroot', () => { // {{SQL CARBON ED
|
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
};
|
|
|
|
|
return jsonEditingServce.write(workspaceContextService.getWorkspace().configuration!, { key: 'launch', value: expectedLaunchConfiguration }, true)
|
|
|
|
|
return jsonEditingServce.write(workspaceContextService.getWorkspace().configuration!, [{ key: 'launch', value: expectedLaunchConfiguration }], true)
|
|
|
|
|
.then(() => testObject.reloadConfiguration())
|
|
|
|
|
.then(() => {
|
|
|
|
|
const actual = testObject.inspect('launch').workspace;
|
|
|
|
|
@@ -1496,7 +1496,7 @@ suite.skip('WorkspaceConfigurationService-Multiroot', () => { // {{SQL CARBON ED
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
test('task configurations are not read from workspace', () => {
|
|
|
|
|
return jsonEditingServce.write(workspaceContextService.getWorkspace().configuration!, { key: 'tasks', value: { 'version': '1.0' } }, true)
|
|
|
|
|
return jsonEditingServce.write(workspaceContextService.getWorkspace().configuration!, [{ key: 'tasks', value: { 'version': '1.0' } }], true)
|
|
|
|
|
.then(() => testObject.reloadConfiguration())
|
|
|
|
|
.then(() => {
|
|
|
|
|
const actual = testObject.inspect('tasks.version');
|
|
|
|
|
|