Initial VS Code 1.19 source merge (#571)

* Initial 1.19 xcopy

* Fix yarn build

* Fix numerous build breaks

* Next batch of build break fixes

* More build break fixes

* Runtime breaks

* Additional post merge fixes

* Fix windows setup file

* Fix test failures.

* Update license header blocks to refer to source eula
This commit is contained in:
Karl Burtram
2018-01-28 23:37:17 -08:00
committed by GitHub
parent 9a1ac20710
commit 251ae01c3e
8009 changed files with 93378 additions and 35634 deletions

View File

@@ -25,7 +25,7 @@ suite('ExtHostConfiguration', function () {
this.lastArgs = [target, key, value];
return TPromise.as(void 0);
}
};
}
function createExtHostConfiguration(contents: any = Object.create(null), shape?: MainThreadConfigurationShape) {
if (!shape) {
@@ -91,6 +91,47 @@ suite('ExtHostConfiguration', function () {
assert.deepEqual(config.get('nested'), { config1: 42, config2: 'Das Pferd frisst kein Reis.' });
});
test('can modify the returned configuration', function () {
const all = createExtHostConfiguration({
'farboo': {
'config0': true,
'nested': {
'config1': 42,
'config2': 'Das Pferd frisst kein Reis.'
},
'config4': ''
}
});
let testObject = all.getConfiguration();
let actual = testObject.get('farboo');
actual['farboo1'] = 'newValue';
assert.equal('newValue', actual['farboo1']);
testObject = all.getConfiguration();
testObject['farboo']['farboo1'] = 'newValue';
assert.equal('newValue', testObject['farboo']['farboo1']);
testObject = all.getConfiguration();
testObject['farboo']['farboo1'] = 'newValue';
assert.equal('newValue', testObject.get('farboo')['farboo1']);
testObject = all.getConfiguration();
actual = testObject.inspect('farboo');
actual['value'] = 'effectiveValue';
assert.equal('effectiveValue', actual['value']);
testObject = all.getConfiguration();
actual = testObject.get('farboo');
assert.equal(undefined, actual['farboo1']);
testObject = all.getConfiguration();
testObject['farboo']['farboo1'] = 'newValue';
testObject = all.getConfiguration();
assert.equal(undefined, testObject['farboo']['farboo1']);
});
test('inspect in no workspace context', function () {
const testObject = new ExtHostConfiguration(
new class extends mock<MainThreadConfigurationShape>() { },