mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-23 01:25:38 -05:00
Merge from vscode 64980ea1f3f532c82bb6c28d27bba9ef2c5b4463 (#7206)
* Merge from vscode 64980ea1f3f532c82bb6c28d27bba9ef2c5b4463 * fix config changes * fix strictnull checks
This commit is contained in:
@@ -812,10 +812,10 @@ suite('Glob', () => {
|
||||
'{**/bar/**,**/baz/**}': true,
|
||||
'**/bulb/**': false
|
||||
}, ['foo', 'bar', 'baz'], [
|
||||
['bar/foo', '**/foo/**'],
|
||||
['foo/bar', '{**/bar/**,**/baz/**}'],
|
||||
['bar/nope', null!]
|
||||
]);
|
||||
['bar/foo', '**/foo/**'],
|
||||
['foo/bar', '{**/bar/**,**/baz/**}'],
|
||||
['bar/nope', null!]
|
||||
]);
|
||||
|
||||
const siblings = ['baz', 'baz.zip', 'nope'];
|
||||
const hasSibling = (name: string) => siblings.indexOf(name) !== -1;
|
||||
@@ -823,15 +823,15 @@ suite('Glob', () => {
|
||||
'**/foo/**': { when: '$(basename).zip' },
|
||||
'**/bar/**': true
|
||||
}, ['bar'], [
|
||||
['bar/foo', null!],
|
||||
['bar/foo/baz', null!],
|
||||
['bar/foo/nope', null!],
|
||||
['foo/bar', '**/bar/**'],
|
||||
], [
|
||||
null!,
|
||||
hasSibling,
|
||||
hasSibling
|
||||
]);
|
||||
['bar/foo', null!],
|
||||
['bar/foo/baz', null!],
|
||||
['bar/foo/nope', null!],
|
||||
['foo/bar', '**/bar/**'],
|
||||
], [
|
||||
null!,
|
||||
hasSibling,
|
||||
hasSibling
|
||||
]);
|
||||
});
|
||||
|
||||
function testOptimizationForBasenames(pattern: string | glob.IExpression, basenameTerms: string[], matches: [string, string | boolean][], siblingsFns: ((name: string) => boolean)[] = []) {
|
||||
@@ -917,11 +917,11 @@ suite('Glob', () => {
|
||||
// '{**/bar/bar/**,**/baz/bar/**}': true,
|
||||
'**/bulb/bar/**': false
|
||||
}, ['*/foo/bar'], [
|
||||
[nativeSep('bar/foo/bar'), '**/foo/bar/**'],
|
||||
// Not supported
|
||||
// [nativeSep('foo/bar/bar'), '{**/bar/bar/**,**/baz/bar/**}'],
|
||||
[nativeSep('/foo/bar/nope'), null!]
|
||||
]);
|
||||
[nativeSep('bar/foo/bar'), '**/foo/bar/**'],
|
||||
// Not supported
|
||||
// [nativeSep('foo/bar/bar'), '{**/bar/bar/**,**/baz/bar/**}'],
|
||||
[nativeSep('/foo/bar/nope'), null!]
|
||||
]);
|
||||
|
||||
const siblings = ['baz', 'baz.zip', 'nope'];
|
||||
let hasSibling = (name: string) => siblings.indexOf(name) !== -1;
|
||||
@@ -929,15 +929,15 @@ suite('Glob', () => {
|
||||
'**/foo/123/**': { when: '$(basename).zip' },
|
||||
'**/bar/123/**': true
|
||||
}, ['*/bar/123'], [
|
||||
[nativeSep('bar/foo/123'), null!],
|
||||
[nativeSep('bar/foo/123/baz'), null!],
|
||||
[nativeSep('bar/foo/123/nope'), null!],
|
||||
[nativeSep('foo/bar/123'), '**/bar/123/**'],
|
||||
], [
|
||||
null!,
|
||||
hasSibling,
|
||||
hasSibling
|
||||
]);
|
||||
[nativeSep('bar/foo/123'), null!],
|
||||
[nativeSep('bar/foo/123/baz'), null!],
|
||||
[nativeSep('bar/foo/123/nope'), null!],
|
||||
[nativeSep('foo/bar/123'), '**/bar/123/**'],
|
||||
], [
|
||||
null!,
|
||||
hasSibling,
|
||||
hasSibling
|
||||
]);
|
||||
});
|
||||
|
||||
function testOptimizationForPaths(pattern: string | glob.IExpression, pathTerms: string[], matches: [string, string | boolean][], siblingsFns: ((name: string) => boolean)[] = []) {
|
||||
|
||||
@@ -18,6 +18,8 @@ suite('Keytar', () => {
|
||||
const name = `VSCode Test ${Math.floor(Math.random() * 1e9)}`;
|
||||
try {
|
||||
await keytar.setPassword(name, 'foo', 'bar');
|
||||
assert.equal(await keytar.findPassword(name), 'bar');
|
||||
assert.equal((await keytar.findCredentials(name)).length, 1);
|
||||
assert.equal(await keytar.getPassword(name, 'foo'), 'bar');
|
||||
await keytar.deletePassword(name, 'foo');
|
||||
assert.equal(await keytar.getPassword(name, 'foo'), undefined);
|
||||
|
||||
Reference in New Issue
Block a user