Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
gcampbell-msft committed Aug 6, 2024
1 parent 91777e3 commit f30867b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/presetsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1610,6 +1610,7 @@ export class PresetsController implements vscode.Disposable {
if (this.presetsFileExist && file === this.userPresetsPath) {
presetsFile.include = presetsFile.include || [];
const filteredIncludes = presetsFile.include.filter(include => {
// Ensuring that we handle expansions. Duplicated from loop below.
const includePath = presetsFile.version >= 7 ?
// Version 7 and later support $penv{} expansions in include paths
substituteAll(include, getParentEnvSubstitutions(include, new Map<string, string>())).result :
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
"environment": {
"TEST_VARIANT_ENV": "0cbfb6ae-f2ec-4017-8ded-89df8759c502"
}
},
{
"name": "TestInheritFromPreset",
"inherits": "Linux1"
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,9 @@ suite('Preset include functionality', () => {
const result = await testEnv.result.getResultAsJson();
expect(result['cookie']).to.eq('passed-cookie');
}).timeout(100000);

test('Configure CMakeUserPreset inheriting from CMakePreset', async function (this: Mocha.Context) {
await vscode.commands.executeCommand('cmake.setConfigurePreset', 'TestInheritFromPreset');
expect(await vscode.commands.executeCommand('cmake.showConfigureCommand')).to.be.eq(0);
}).timeout(100000);
});

0 comments on commit f30867b

Please sign in to comment.