Configurations ${WorkSpace} autocomplete broken after update (#155713)

Configurations ${WorkSpace} autocomplete broken after update. Fixes #155638
This commit is contained in:
Martin Aeschlimann
2022-07-20 14:01:52 +02:00
committed by GitHub
parent ce5d92e998
commit 28be5d9906
3 changed files with 44 additions and 4 deletions

View File

@@ -73,6 +73,20 @@ suite('Completions in settings.json', () => {
const expected = { label: '${activeEditorMedium}', resultText };
await testCompletion(testFile, 'jsonc', content, expected);
}
{ // replacing a partial variable
const content = [
'{',
' "window.title": "${a|"',
'}',
].join('\n');
const resultText = [
'{',
' "window.title": "${dirty}"',
'}',
].join('\n');
const expected = { label: '${dirty}', resultText };
await testCompletion(testFile, 'jsonc', content, expected);
}
{ // inserting a literal
const content = [
'{',
@@ -382,6 +396,32 @@ suite('Completions in launch.json', () => {
const expected = { label: '${cwd}', resultText };
await testCompletion(testFile, 'jsonc', content, expected);
}
{
const content = [
'{',
' "version": "0.2.0",',
' "configurations": [',
' {',
' "name": "Do It",',
' "program": "${workspace|"',
' }',
' ]',
'}',
].join('\n');
const resultText = [
'{',
' "version": "0.2.0",',
' "configurations": [',
' {',
' "name": "Do It",',
' "program": "${cwd}"',
' }',
' ]',
'}',
].join('\n');
const expected = { label: '${cwd}', resultText };
await testCompletion(testFile, 'jsonc', content, expected);
}
});
});