win: fix incomplete VSCEIP, location scripts
This commit improves the validation logic in parser, corrects Windows collection files to adhere to expected structure. This validation helps catch errors that previously led to incomplete generated code in scripts for disabling VSCEIP and location settings. Changes: - Add type validation for function call structures in the parser/compiler. This helps prevent runtime errors by ensuring that only correctly structured data is processed. - Fix scripts in the Windows collection that previoulsy had incomplete `code` or `revertCode` values. These corrections ensure that the scripts function as intended. - Refactor related logic within the compiler/parser to improve testability and maintainability.
This commit is contained in:
@@ -32,7 +32,10 @@ describe('CategoryCollectionSpecificUtilities', () => {
|
||||
// arrange
|
||||
const functionsData = [createFunctionDataWithCode()];
|
||||
const syntax = new LanguageSyntaxStub();
|
||||
const expected = new ScriptCompiler(functionsData, syntax);
|
||||
const expected = new ScriptCompiler({
|
||||
functions: functionsData,
|
||||
syntax,
|
||||
});
|
||||
const language = ScriptingLanguage.shellscript;
|
||||
const factoryMock = createSyntaxFactoryStub(language, syntax);
|
||||
const definition = new ScriptingDefinitionStub()
|
||||
|
||||
Reference in New Issue
Block a user