Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 (#6381)

* Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973

* disable strict null check
This commit is contained in:
Anthony Dresser
2019-07-15 22:35:46 -07:00
committed by GitHub
parent f720ec642f
commit 0b7e7ddbf9
2406 changed files with 59140 additions and 35464 deletions

View File

@@ -0,0 +1,28 @@
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as assert from 'assert';
import { isWindows } from 'vs/base/common/platform';
suite('Windows Native Helpers', () => {
test('windows-mutex', async () => {
if (!isWindows) {
return;
}
const mutex = await import('windows-mutex');
assert.ok(mutex, 'Unable to load windows-mutex dependency.');
assert.ok(typeof mutex.isActive === 'function', 'Unable to load windows-mutex dependency.');
});
test('windows-foreground-love', async () => {
if (!isWindows) {
return;
}
const foregroundLove = await import('windows-foreground-love');
assert.ok(foregroundLove, 'Unable to load windows-foreground-love dependency.');
});
});

View File

@@ -4,10 +4,11 @@
*--------------------------------------------------------------------------------------------*/
import * as assert from 'assert';
import { formatOptions, Option, addArg } from 'vs/platform/environment/node/argv';
import { ParsedArgs } from 'vs/platform/environment/common/environment';
suite('formatOptions', () => {
function o(id: string, description: string): Option {
function o(id: keyof ParsedArgs, description: string): Option {
return {
id, description, type: 'string'
};
@@ -16,30 +17,30 @@ suite('formatOptions', () => {
test('Text should display small columns correctly', () => {
assert.deepEqual(
formatOptions([
o('foo', 'bar')
o('add', 'bar')
], 80),
[' --foo bar']
[' --add bar']
);
assert.deepEqual(
formatOptions([
o('f', 'bar'),
o('fo', 'ba'),
o('foo', 'b')
o('add', 'bar'),
o('wait', 'ba'),
o('trace', 'b')
], 80),
[
' --f bar',
' --fo ba',
' --foo b'
' --add bar',
' --wait ba',
' --trace b'
]);
});
test('Text should wrap', () => {
assert.deepEqual(
formatOptions([
o('foo', (<any>'bar ').repeat(9))
o('add', (<any>'bar ').repeat(9))
], 40),
[
' --foo bar bar bar bar bar bar bar bar',
' --add bar bar bar bar bar bar bar bar',
' bar'
]);
});
@@ -47,10 +48,10 @@ suite('formatOptions', () => {
test('Text should revert to the condensed view when the terminal is too narrow', () => {
assert.deepEqual(
formatOptions([
o('foo', (<any>'bar ').repeat(9))
o('add', (<any>'bar ').repeat(9))
], 30),
[
' --foo',
' --add',
' bar bar bar bar bar bar bar bar bar '
]);
});