diff --git a/JsonPreprocessor/CJsonPreprocessor.py b/JsonPreprocessor/CJsonPreprocessor.py index 12149d1c..8322a923 100644 --- a/JsonPreprocessor/CJsonPreprocessor.py +++ b/JsonPreprocessor/CJsonPreprocessor.py @@ -71,6 +71,7 @@ class CNameMangling(Enum): LISTINDEX = "__IndexOfList__" SLICEINDEX = "__SlicingIndex__" STRINGVALUE = "__StringValueMake-up__" + DYNAMICIMPORTED = "__DynamicImportedHandling__" class CPythonJSONDecoder(json.JSONDecoder): """ @@ -190,18 +191,20 @@ def __init__(self, syntax: CSyntaxType = CSyntaxType.python , currentCfg : dict self.jsonPath = None self.masterFile = None self.handlingFile = [] + self.iDynamicImport = 0 + self.lDynamicImports = [] self.lImportedFiles = [] self.recursive_level = 0 self.syntax = syntax self.currentCfg = currentCfg self.dUpdatedParams = {} self.lDotInParamName = [] - self.bDuplicatedKeys = True + self.bJSONPreCheck = False self.jsonCheck = {} self.JPGlobals = {} - self.pythonTypeError = ["object is not subscriptable", \ - "string indices must be integers", \ - "list indices must be integers", \ + self.pythonTypeError = ["object is not subscriptable", + "string indices must be integers", + "list indices must be integers", "index out of range"] def __getFailedJsonDoc(self, jsonDecodeError=None, areaBeforePosition=50, areaAfterPosition=20, oneLine=True): @@ -232,11 +235,13 @@ def __reset(self) -> None: self.jsonPath = None self.masterFile = None self.handlingFile = [] + self.iDynamicImport = 0 + self.lDynamicImports = [] self.lImportedFiles = [] self.recursive_level = 0 self.dUpdatedParams = {} self.lDotInParamName = [] - self.bDuplicatedKeys = True + self.bJSONPreCheck = False self.jsonCheck = {} self.JPGlobals = {} @@ -267,31 +272,62 @@ def __processImportFiles(self, input_data : dict) -> dict: sCheckElement = CNameMangling.DUPLICATEDKEY_01.value for key, value in input_data: if re.match('^\s*\[\s*import\s*\]\s*', key.lower()): - currJsonPath = self.jsonPath - abs_path_file = CString.NormalizePath(value, sReferencePathAbs = currJsonPath) - - # Use recursive_level and lImportedFiles to avoid cyclic import - self.recursive_level = self.recursive_level + 1 # increase recursive level - - # length of lImportedFiles should equal to recursive_level - self.lImportedFiles = self.lImportedFiles[:self.recursive_level] if self.masterFile is not None else \ - self.lImportedFiles[:self.recursive_level-1] - if abs_path_file in self.lImportedFiles: - raise Exception(f"Cyclic imported json file '{abs_path_file}'!") - - oJsonImport = self.jsonLoad(abs_path_file) - self.jsonPath = currJsonPath - tmpOutdict = copy.deepcopy(out_dict) - for k1, v1 in tmpOutdict.items(): - for k2, v2 in oJsonImport.items(): - if k2 == k1: - del out_dict[k1] - del tmpOutdict - out_dict.update(oJsonImport) - - self.recursive_level = self.recursive_level - 1 # descrease recursive level + if not isinstance(value, str): + errorMsg = f"The value of [import] parameter must be 'str' but receiving the value '{value}'" + self.__reset() + raise Exception(errorMsg) + if '${' in value: + if not self.bJSONPreCheck: # self.bJSONPreCheck is set True when handling pre-check JSON files by __preCheckJsonFile() + value = self.lDynamicImports.pop(0) + if '${' in value: + dynamicImported = re.search(rf'^(.*){CNameMangling.DYNAMICIMPORTED.value}(.*)$', value) + value = self.__removeTokenStr(dynamicImported[2]) + nestedParams = re.findall(rf'(\${{[^{re.escape(self.specialCharacters)}]+}}(\[.*\])*)', value) + sParams = '' + for item in nestedParams: + sParams += f"{item[0]} " + errorMsg = f"Could not load the import file '{value}'. The parameter '{sParams}' is not available!" + self.__reset() + raise Exception(errorMsg) + else: + if re.match(r'^\[\s*import\s*\]$', key.strip()): + self.iDynamicImport +=1 + value = self.jsonPath + CNameMangling.DYNAMICIMPORTED.value + value + out_dict[f"{key.strip()}_{self.iDynamicImport}"] = value + self.lDynamicImports.append(value) + else: + out_dict[key] = value + if '${' not in value: + if re.match(r'^\[\s*import\s*\]_\d+$', key): + if value in self.lDynamicImports: + raise Exception(f"Cyclic imported json file '{value}'!") + dynamicIpmportIndex = re.search(r'_(\d+)$', key)[1] + self.lDynamicImports[int(dynamicIpmportIndex)-1] = value + currJsonPath = self.jsonPath + abs_path_file = CString.NormalizePath(value, sReferencePathAbs = currJsonPath) + + # Use recursive_level and lImportedFiles to avoid cyclic import + self.recursive_level = self.recursive_level + 1 # increase recursive level + + # length of lImportedFiles should equal to recursive_level + self.lImportedFiles = self.lImportedFiles[:self.recursive_level] if self.masterFile is not None else \ + self.lImportedFiles[:self.recursive_level-1] + if abs_path_file in self.lImportedFiles: + raise Exception(f"Cyclic imported json file '{abs_path_file}'!") + + oJsonImport = self.jsonLoad(abs_path_file) + self.jsonPath = currJsonPath + tmpOutdict = copy.deepcopy(out_dict) + for k1, v1 in tmpOutdict.items(): + for k2, v2 in oJsonImport.items(): + if k2 == k1: + del out_dict[k1] + del tmpOutdict + out_dict.update(oJsonImport) + + self.recursive_level = self.recursive_level - 1 # descrease recursive level else: - if self.bDuplicatedKeys: + if not self.bJSONPreCheck: specialCharacters = r'$[]{}' tmpOutdict = copy.deepcopy(out_dict) for k1, v1 in tmpOutdict.items(): @@ -535,22 +571,27 @@ def __getNestedValue(sNestedParam : str): exec(sExec, locals(), ldict) tmpValue = ldict['value'] except Exception as error: - self.__reset() - sNestedParam = self.__removeTokenStr(sNestedParam) - errorMsg = '' - for errorType in self.pythonTypeError: - if errorType in str(error): - errorMsg = f"Could not resolve expression '{sNestedParam.replace('$$', '$')}'." - if errorMsg != '': - errorMsg = errorMsg + f" Reason: {error}" if ' or slices' not in str(error) else \ - errorMsg + f" Reason: {str(error).replace(' or slices', '')}" + if self.bJSONPreCheck: + sNestedParam = self.__removeTokenStr(sNestedParam) + tmpValue = sNestedParam.replace('$$', '$') + pass else: - if isinstance(error, KeyError) and re.search(r"\[\s*" + str(error) + "\s*\]", sNestedParam): - errorMsg = f"Could not resolve expression '{sNestedParam.replace('$$', '$')}'. \ -Reason: Key error {error}" + self.__reset() + sNestedParam = self.__removeTokenStr(sNestedParam) + errorMsg = '' + for errorType in self.pythonTypeError: + if errorType in str(error): + errorMsg = f"Could not resolve expression '{sNestedParam.replace('$$', '$')}'." + if errorMsg != '': + errorMsg = errorMsg + f" Reason: {error}" if ' or slices' not in str(error) else \ + errorMsg + f" Reason: {str(error).replace(' or slices', '')}" else: - errorMsg = f"The parameter '{sNestedParam.replace('$$', '$')}' is not available!" - raise Exception(errorMsg) + if isinstance(error, KeyError) and re.search(r"\[\s*" + str(error) + "\s*\]", sNestedParam): + errorMsg = f"Could not resolve expression '{sNestedParam.replace('$$', '$')}'. \ +Reason: Key error {error}" + else: + errorMsg = f"The parameter '{sNestedParam.replace('$$', '$')}' is not available!" + raise Exception(errorMsg) return tmpValue specialCharacters = r'[]{}' @@ -560,12 +601,12 @@ def __getNestedValue(sNestedParam : str): for var in referVars: if var not in sInputStr: continue - if "." in var: + if re.search(r'\${.+\..+}', var): sVar = self.__handleDotInNestedParam(var) sInputStr = sInputStr.replace(var, sVar) tmpPattern = pattern + rf'(\[\s*\d+\s*\]|\[\s*\'[^{re.escape(specialCharacters)}]+\'\s*\])*' sNestedParam = self.__removeTokenStr(sInputStr.replace("$$", "$")) - if "." in sInputStr and not bConvertToStr: + if re.search(r'\${.+\..+}', sInputStr) and not bConvertToStr: sInputStr = self.__handleDotInNestedParam(sInputStr) while re.search(tmpPattern, sInputStr, re.UNICODE) and sInputStr.count("$$")>1: sLoopCheck = sInputStr @@ -573,8 +614,11 @@ def __getNestedValue(sNestedParam : str): if len(referVars)==0: referVars = re.findall(r'(' + tmpPattern + r')$', sInputStr, re.UNICODE) for var in referVars: - sVar = self.__handleDotInNestedParam(var[0]) if "." in var[0] else var[0] + sVar = self.__handleDotInNestedParam(var[0]) if re.search(r'\${.+\..+}', var[0]) else var[0] tmpValue = __getNestedValue(sVar) + if self.bJSONPreCheck: + if "${" in tmpValue and bConvertToStr: + tmpValue = tmpValue + CNameMangling.STRINGCONVERT.value if (isinstance(tmpValue, list) or isinstance(tmpValue, dict)) and bConvertToStr: self.__reset() sVar = self.__removeTokenStr(sVar) @@ -643,12 +687,12 @@ def __getNestedValue(sNestedParam : str): tmpPattern = pattern + rf'(\[\s*\-*\d+\s*\]|\[[\s\']*[^{re.escape(specialCharacters)}]+[\'\s]*\])*' if re.match("^" + tmpPattern + "$", sInputStr.strip(), re.UNICODE) and bKey and not bConvertToStr: rootVar = re.search(pattern, sInputStr, re.UNICODE)[0] - sRootVar = self.__handleDotInNestedParam(rootVar) if "." in rootVar else rootVar + sRootVar = self.__handleDotInNestedParam(rootVar) if re.search(r'\${.+\..+}', rootVar) else rootVar sInputStr = sInputStr.replace(rootVar, sRootVar) return self.__multipleReplace(sInputStr, {"$${":"", "}":""}) var = re.search(tmpPattern, sInputStr, re.UNICODE) if var==None: - sVar = self.__handleDotInNestedParam(sInputStr) if "." in sInputStr else sInputStr + sVar = self.__handleDotInNestedParam(sInputStr) if re.search(r'\${.+\..+}', sInputStr) else sInputStr sVar = re.sub(r'^\s*\$\${\s*([^}]+)}', "['\\1']", sVar) sExec = "value = self.JPGlobals" + sVar try: @@ -656,20 +700,25 @@ def __getNestedValue(sNestedParam : str): exec(sExec, locals(), ldict) tmpValue = ldict['value'] except Exception as error: - self.__reset() - errorMsg = '' - for errorType in self.pythonTypeError: - if errorType in str(error): - errorMsg = f"Could not resolve expression '{sNestedParam.replace('$$', '$')}'." - if errorMsg != '': - errorMsg = errorMsg + f" Reason: {error}" + if self.bJSONPreCheck: + sNestedParam = self.__removeTokenStr(sNestedParam) + tmpValue = sNestedParam.replace('$$', '$') + pass else: - errorMsg = f"The parameter '{sNestedParam.replace('$$', '$')}' is not available!" - raise Exception(errorMsg) + self.__reset() + errorMsg = '' + for errorType in self.pythonTypeError: + if errorType in str(error): + errorMsg = f"Could not resolve expression '{sNestedParam.replace('$$', '$')}'." + if errorMsg != '': + errorMsg = errorMsg + f" Reason: {error}" + else: + errorMsg = f"The parameter '{sNestedParam.replace('$$', '$')}' is not available!" + raise Exception(errorMsg) return tmpValue else: rootVar = re.search(pattern, var[0], re.UNICODE)[0] - sRootVar = self.__handleDotInNestedParam(rootVar) if "." in rootVar else rootVar + sRootVar = self.__handleDotInNestedParam(rootVar) if re.search(r'\${.+\..+}', rootVar) else rootVar sVar = var[0].replace(rootVar, sRootVar) tmpValue = __getNestedValue(sVar) if bConvertToStr and (isinstance(tmpValue, list) or isinstance(tmpValue, dict)): @@ -982,7 +1031,7 @@ def __loadNestedValue(initValue: str, sInputStr: str, bKey=False, key=''): dictPattern = r"(\[+\s*'[^\$\[\]\(\)]+'\s*\]+|\[+\s*\d+\s*\]+|\[+\s*\${\s*[^\[]*\s*}.*\]+)*|" + indexPattern pattern = r"\${\s*[^\[}\$]*(\.*\${\s*[\[]*\s*})*" + dictPattern bValueConvertString = False - if CNameMangling.STRINGCONVERT.value in sInputStr: + if CNameMangling.STRINGCONVERT.value in sInputStr or re.match(r'^\[\s*import\s*\]_\d+$', key): bValueConvertString = True sInputStr = sInputStr.replace(CNameMangling.STRINGCONVERT.value, '') sInputStr = re.sub("\$", "$$", sInputStr) @@ -1148,14 +1197,30 @@ def __handleList(lInput : list, bNested : bool) -> list: initValue = v while isinstance(v, str) and "${" in v: sLoopCheck = v - if v.count('${')==1 and CNameMangling.STRINGCONVERT.value not in v: # re.match(pattern, v) - if '.' in v: + if v.count('${')==1 and CNameMangling.STRINGCONVERT.value not in v: + if re.search(r'\${.+\..+}', v): paramInValue = self.__handleDotInNestedParam(v) paramInValue = self.__multipleReplace(paramInValue, {'${':'', '}':''}) - v = __loadNestedValue(initValue, v) + v = __loadNestedValue(initValue, v, key=k) + # Handle dynamic import value + if re.match(r'^\[\s*import\s*\]_\d+$', k): + if '${' not in v and CNameMangling.DYNAMICIMPORTED.value in v: + dynamicImported = re.search(rf'^(.*){CNameMangling.DYNAMICIMPORTED.value}(.*)$', v) + if re.match(r'^[\d\.]+$', dynamicImported[2]) or \ + re.search(r'(\[[^\[]+\])|(\([^\(]+\))|({[^{]+})', dynamicImported[2]): + errorMsg = f"The value of [import] parameter must be 'str' but receiving the value '{dynamicImported[2]}'" + self.__reset() + raise Exception(errorMsg) + if re.match(r'^[/|\\].+$', dynamicImported[2]): + v = dynamicImported[2] + else: + v = CString.NormalizePath(dynamicImported[2], sReferencePathAbs = dynamicImported[1]) if v == sLoopCheck: - self.__reset() - raise Exception(f"Invalid expression found: '{self.__removeTokenStr(initValue)}'.") + if not self.bJSONPreCheck: + self.__reset() + raise Exception(f"Invalid expression found: '{self.__removeTokenStr(initValue)}'.") + else: + break if isinstance(v, str) and re.search(r'\[[^\]]+\]', v): sExec = 'value = ' + v try: @@ -1252,9 +1317,13 @@ def __checkNestedParam(self, sInput : str, bKey=False, bCheckKeyName=False) -> b pattern = rf"^\${{\s*[^{re.escape(self.specialCharacters)}]+\s*}}(\[.*\])+$" pattern1 = rf"\${{.+}}(\[.+\])*[^\[]*\${{" pattern2 = r"\[[a-zA-Z0-9\.\-\+\${}'\s]*:[a-zA-Z0-9\.\-\+\${}'\s]*\]" # Slicing pattern + if CNameMangling.DYNAMICIMPORTED.value in sInput: + dynamicImported = re.search(rf'^(.*){CNameMangling.DYNAMICIMPORTED.value}(.*)$', sInput) + sInput = dynamicImported[2] # Checks special character in parameters sTmpInput = sInput bSpecialCharInParam = False + sCheckInput = sTmpInput while sTmpInput.count("${") > 1: lParams = re.findall(r'\${([^\$}]*)}', sTmpInput) for param in lParams: @@ -1263,8 +1332,9 @@ def __checkNestedParam(self, sInput : str, bKey=False, bCheckKeyName=False) -> b bSpecialCharInParam = True break sTmpInput = sTmpInput.replace('${' + param + '}', '') - if bSpecialCharInParam: + if bSpecialCharInParam or sCheckInput==sTmpInput: break + sCheckInput = sTmpInput if "${" not in sInput: return True errorMsg = None @@ -1291,7 +1361,8 @@ def __checkNestedParam(self, sInput : str, bKey=False, bCheckKeyName=False) -> b re.match(r"^[\s\"]*\${[^!@#%\^&\*\(\)=|;,<>?/`~]+[\s\"]*$", sInput)): errorMsg = f"Invalid syntax! One or more than one closed curly bracket is missing in \ expression '{self.__removeTokenStr(sInput.strip())}'." - elif not re.match(r"^\${.+[}\]]+$", sInput) or (re.search(pattern1, sInput) and not bKey): + elif (not re.match(r"^\${.+[}\]]+$", sInput) or (re.search(pattern1, sInput) and not bKey)) \ + and not self.bJSONPreCheck: if CNameMangling.STRINGCONVERT.value not in sInput and CNameMangling.DUPLICATEDKEY_01.value not in sInput: sTmpInput = re.sub(r"(\.\${[a-zA-Z0-9\.\_]+}(\[[^\[]+\])*)", "", sInput) if not re.match(r"^\s*\${[a-zA-Z0-9\.\_]+}(\[[^\[]+\])*\s*$", sTmpInput): @@ -1428,6 +1499,56 @@ def __removeTokenStr(self, sInput : str) -> str: sInput = sInput.replace(tokenStr.value, '') return sInput + def __preCheckJsonFile(self, sInput, CJSONDecoder): + ''' +Checks and handle dynamic path of imported file. +**Arguments:** + +* ``sInput`` + + / *Condition*: required / *Type*: str / + +* ``CJSONDecoder`` + + / *Condition*: required / *Type*: str / + +**Returns:** + +* ``sInput`` + + / *Type*: str / + ''' + try: + self.jsonCheck = json.loads(sInput, cls=CJSONDecoder, object_pairs_hook=self.__processImportFiles) + except Exception as error: + failedJsonDoc = self.__getFailedJsonDoc(error) + jsonException = "not defined" + if failedJsonDoc is None: + jsonException = f"{error}\nIn file: '{self.handlingFile.pop(-1)}'" if len(self.handlingFile)>0 else f"{error}" + else: + jsonException = f"{error}\nNearby: '{failedJsonDoc}'\nIn file: '{self.handlingFile.pop(-1)}'" if len(self.handlingFile)>0 else \ + f"{error}\nNearby: '{failedJsonDoc}'" + self.__reset() + raise Exception(jsonException) + self.JPGlobals = self.jsonCheck + importPattern = r'([\'|"]\s*\[\s*import\s*\]_*\d*\s*[\'|"]\s*:\s*[\'|"][^\'"]+[\'|"])' + sJson = json.dumps(self.jsonCheck) + lImport = re.findall(importPattern, sJson) + if len(lImport)==0: + sInput = sJson + return sInput + else: + while re.search(importPattern, sJson): + tmpJson = sJson + self.__checkDotInParamName(self.jsonCheck) + oJson, bNested = self.__updateAndReplaceNestedParam(self.jsonCheck) + sJson = json.dumps(oJson) + if sJson==tmpJson: + break + sJson = self.__preCheckJsonFile(sJson, CJSONDecoder) + sInput = sJson + return sInput + def jsonLoad(self, jFile : str): """ This method is the entry point of JsonPreprocessor. @@ -1518,7 +1639,7 @@ def __handleDuplicatedKey(dInput : dict, parentParams : str = '') -> dict: self.__reset() formatOverwritten1 = re.sub(r'^\[([^\[]+)\]', '${\\1}', parentParams) formatOverwritten1 = formatOverwritten1 + f"['{origK}']" - formatOverwritten2 = self.__multipleReplace(parentParams, {"]['" : ".", "']['" : ".", "[" : "", "']" : ""}) + formatOverwritten2 = self.__multipleReplace(parentParams, {"]['":".", "']['":".", "[":"", "']":"", "]":""}) formatOverwritten2 = "${" + formatOverwritten2 + f".{origK}}}" raise Exception(f"Missing scope for parameter '${{{origK}}}'. To change the value of this parameter, \ an absolute path must be used: '{formatOverwritten1}' or '{formatOverwritten2}'.") @@ -1731,24 +1852,13 @@ def __handleLastElement(sInput : str) -> str: self.__reset() raise Exception(f"Provided syntax '{self.syntax}' is not supported.") # Load the temporary Json object without checking duplicated keys for - # verifying duplicated keys later. + # verifying duplicated keys later. The pre-check method also checks dynamic + # imported files in JSON files. if firstLevel: - self.bDuplicatedKeys = False - try: - self.jsonCheck = json.loads(sJsonDataUpdated, - cls=CJSONDecoder, - object_pairs_hook=self.__processImportFiles) - except Exception as error: - failedJsonDoc = self.__getFailedJsonDoc(error) - jsonException = "not defined" - if failedJsonDoc is None: - jsonException = f"{error}\nIn file: '{self.handlingFile.pop(-1)}'" if len(self.handlingFile)>0 else f"{error}" - else: - jsonException = f"{error}\nNearby: '{failedJsonDoc}'\nIn file: '{self.handlingFile.pop(-1)}'" if len(self.handlingFile)>0 else \ - f"{error}\nNearby: '{failedJsonDoc}'" - self.__reset() - raise Exception(jsonException) - self.bDuplicatedKeys = True + self.bJSONPreCheck = True + sDummyData = self.__preCheckJsonFile(sJsonDataUpdated, CJSONDecoder) + self.iDynamicImport = 0 + self.bJSONPreCheck = False # Load Json object with checking duplicated keys feature is enabled. # The duplicated keys feature uses the self.jsonCheck object to check duplicated keys. diff --git a/JsonPreprocessor/JsonPreprocessor.pdf b/JsonPreprocessor/JsonPreprocessor.pdf index 0495713b..b6c2e7a2 100644 Binary files a/JsonPreprocessor/JsonPreprocessor.pdf and b/JsonPreprocessor/JsonPreprocessor.pdf differ diff --git a/JsonPreprocessor/version.py b/JsonPreprocessor/version.py index 0c8f38a7..0f8f463f 100644 --- a/JsonPreprocessor/version.py +++ b/JsonPreprocessor/version.py @@ -18,6 +18,6 @@ # # Version and date of JsonPreprocessor # -VERSION = "0.8.1" -VERSION_DATE = "28.10.2024" +VERSION = "0.8.2" +VERSION_DATE = "30.10.2024" diff --git a/config/robotframework_aio/release_items_JsonPreprocessor.json b/config/robotframework_aio/release_items_JsonPreprocessor.json index 08fb7da9..aac70b2d 100644 --- a/config/robotframework_aio/release_items_JsonPreprocessor.json +++ b/config/robotframework_aio/release_items_JsonPreprocessor.json @@ -138,7 +138,11 @@ * Added a naming convention check for key names within JSONP content processed by the **JsonPreprocessor** - Key names have to start with a character, digit, or underscore and must not contain these special characters ``!#$%^&()=[]{}|;',?`~`` + Naming convention: + + * Key names can only consist of letters, digits and the following special characters: ``_ + - * / \\`` (backslashes are allowed but must be masked). + * Key names must start with a letter, a digit or an underscore. + * Key names must not be empty strings. But leading and trailing blanks will be removed (and therefore do not cause errors). **Example:** @@ -146,20 +150,30 @@ Invalid key names are: ``\"+param01\"``, ``\"param$01\"``, ``\"abc#Param\"``, ... -* Checked absolute path when overwriting parameter +* Reworked handling of parameter scope - When overwriting a parameter, the absolute path of the parameter must be provided + To change the value of an existing parameter, an absolute path must be used always. **Example:** - |``\u007b`` - | ``\"params\" : \u007b\"001\" : \u007b\"002\" : \u007b`` - | ``\"param\" : 1,`` - | ``$\u007bparams.001.002.param\u007d : 2`` - | ``\u007d`` - | ``\u007d`` - | ``\u007d`` - |``\u007d`` +| ``{`` +| ``\u00a0\u00a0\u00a0\"params\"\u00a0:\u00a0{\"001\"\u00a0:\u00a0{\"002\"\u00a0:\u00a0{`` +| ``\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\"param\"\u00a0:\u00a01,`` +| ``\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0${params.001.002.param}\u00a0:\u00a02`` +| ``\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}`` +| ``\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}`` +| ``\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0}`` +| ``}`` + +* Enabled dynamic paths for imported JSON files (based on dollar operator expressions) + + **Example:** + +| ``{`` +| ``\u00a0\u00a0\u00a0\"root_folder\" : \"imports\",`` +| ``\u00a0\u00a0\u00a0\"json_file\"\u00a0\u00a0\u00a0: \"configuration.jsonp\",`` +| ``\u00a0\u00a0\u00a0\"[import]\"\u00a0\u00a0\u00a0\u00a0: \"./${root_folder}/${json_file}\" `` +| ``}`` " ] } diff --git a/packagedoc/additional_docs/History.tex b/packagedoc/additional_docs/History.tex index 4a22a006..1effe64b 100644 --- a/packagedoc/additional_docs/History.tex +++ b/packagedoc/additional_docs/History.tex @@ -86,4 +86,7 @@ - Prevented side effects of token string in error messages log\newline - Checked absolute path when overwriting parameter} +\historyversiondate{0.8.2}{10/2024} +\historychange{- Enhanced import JSON file feature which allows dynamic path of imported file} + \end{packagehistory} diff --git a/test/JPP_TestUsecases.csv b/test/JPP_TestUsecases.csv index 52d6dca9..278e4680 100644 --- a/test/JPP_TestUsecases.csv +++ b/test/JPP_TestUsecases.csv @@ -67,6 +67,12 @@ JPP_0369|VALUE_DETECTION|BADCASE|JSON file with expression starting with '${' an JPP_0370|VALUE_DETECTION|BADCASE|JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (not all nested) (invalid syntax 4) JPP_0371|VALUE_DETECTION|BADCASE|JSON file with expression starting with '${' and ending with '}', further matching '${' and '}' in between (not all nested) (invalid syntax 5) JPP_0400|NAMING_CONVENTION|GOODCASE|JSON file with several parameter names w.r.t. the naming convention +JPP_0450|NAMING_CONVENTION|BADCASE|JSON file with several invalid parameter names (1) +JPP_0451|NAMING_CONVENTION|BADCASE|JSON file with several invalid parameter names (2) +JPP_0452|NAMING_CONVENTION|BADCASE|JSON file with several invalid parameter names (3) +JPP_0453|NAMING_CONVENTION|BADCASE|JSON file with several invalid parameter names (4) +JPP_0454|NAMING_CONVENTION|BADCASE|JSON file with several invalid parameter names (5) +JPP_0455|NAMING_CONVENTION|BADCASE|JSON file with several invalid parameter names (6) JPP_0500|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file with composite data structure (nested lists and dictionaries 1) JPP_0501|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file with composite data structure (nested lists and dictionaries 2) JPP_0502|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file with composite data structure (nested lists and dictionaries 3 / some key names with dots inside) @@ -110,8 +116,25 @@ JPP_1055|IMPLICIT_CREATION|BADCASE|JSON file with implicit creation of data stru JPP_1056|IMPLICIT_CREATION|BADCASE|JSON file with implicit creation of data structures based on parameters (6) JPP_1057|IMPLICIT_CREATION|BADCASE|JSON file with implicit creation of data structures based on parameters (7) JPP_1058|IMPLICIT_CREATION|BADCASE|JSON file with implicit creation of data structures based on parameters (8) -JPP_1150|CYCLIC_IMPORTS|BADCASE|JSON file with cyclic imports (JSON file imports itself) -JPP_1151|CYCLIC_IMPORTS|BADCASE|JSON file with cyclic imports (JSON file imports another file, that is already imported) +JPP_1100|FILE_IMPORTS|GOODCASE|JSON file import based on parameters (dynamic import (1)) +JPP_1101|FILE_IMPORTS|GOODCASE|JSON file import based on parameters (dynamic import (2)) +JPP_1102|FILE_IMPORTS|GOODCASE|JSON file import based on parameters (dynamic import (3)) +JPP_1103|FILE_IMPORTS|GOODCASE|JSON file import based on parameters (dynamic import (4)) +JPP_1104|FILE_IMPORTS|GOODCASE|JSON file import based on parameters (dynamic import (5)) +JPP_1105|FILE_IMPORTS|GOODCASE|JSON file import based on parameters (dynamic import (6)) +JPP_1106|FILE_IMPORTS|GOODCASE|JSON file import based on parameters (dynamic import, recursive (7)) +JPP_1107|FILE_IMPORTS|GOODCASE|JSON file import based on parameters (dynamic import, alternate (8)) +JPP_1108|FILE_IMPORTS|GOODCASE|JSON file import based on parameters (dynamic import, parallel (9)) +JPP_1109|FILE_IMPORTS|GOODCASE|JSON file import based on dictionary key values +JPP_1110|FILE_IMPORTS|GOODCASE|JSON file import based on list elemens +JPP_1111|FILE_IMPORTS|GOODCASE|JSON file import based on parameters (dynamic import (7)) +JPP_1150|FILE_IMPORTS|BADCASE|JSON file with cyclic imports (JSON file imports itself, fix path) +JPP_1151|FILE_IMPORTS|BADCASE|JSON file with cyclic imports (JSON file imports another file, that is already imported, fix path) +JPP_1154|FILE_IMPORTS|BADCASE|JSON file with not existing parameter within dynamic import path +JPP_1155|FILE_IMPORTS|BADCASE|JSON file with not existing import file +JPP_1158|FILE_IMPORTS|BADCASE|JSON file with error in [import] key (1) +JPP_1159|FILE_IMPORTS|BADCASE|JSON file with error in [import] key (2) +JPP_1160|FILE_IMPORTS|BADCASE|JSON file with error in imported file JPP_1200|PATH_FORMATS|GOODCASE|Relative path to JSON file JPP_1350|BLOCKED_SLICING|BADCASE|JSON file with blocked slicing notation (-1) JPP_1351|BLOCKED_SLICING|BADCASE|JSON file with blocked slicing notation (-1) @@ -156,11 +179,11 @@ JPP_2001|PARAMETER_SCOPE|GOODCASE|JSON file with nested dictionary, in which a p JPP_2002|PARAMETER_SCOPE|GOODCASE|JSON file with nested dictionary, in which a parameter is overwritten (3) JPP_2003|PARAMETER_SCOPE|GOODCASE|JSON file with nested dictionary, in which a parameter is overwritten (4) JPP_2007|PARAMETER_SCOPE|GOODCASE|JSON file with nested dictionary, in which a parameter is overwritten (8) -JPP_2500|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (1) -JPP_2501|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (2) -JPP_2502|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (3) -JPP_2503|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (4) -JPP_2504|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (5) -JPP_2506|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (7) -JPP_2507|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (8) -JPP_2508|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (9) +JPP_2050|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (1) +JPP_2051|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (2) +JPP_2052|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (3) +JPP_2053|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (4) +JPP_2054|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (5) +JPP_2056|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (7) +JPP_2057|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (8) +JPP_2058|PARAMETER_SCOPE|BADCASE|JSON file containing a parameter with missing scope (9) diff --git a/test/JPP_TestUsecases.html b/test/JPP_TestUsecases.html index 90c0d544..133a4e2b 100644 --- a/test/JPP_TestUsecases.html +++ b/test/JPP_TestUsecases.html @@ -2272,6 +2272,204 @@ 68 + + + +JPP_0450 + + + + +NAMING_CONVENTION + + + + +BADCASE + + + + +JSON file with several invalid parameter names (1)
+Expected: All names are accepted (in definition and in reference) + + +
+ + + + + + + +69 + + + + + +JPP_0451 + + + + +NAMING_CONVENTION + + + + +BADCASE + + + + +JSON file with several invalid parameter names (2)
+Expected: All names are accepted (in definition and in reference) + + +
+ + + + + + + +70 + + + + + +JPP_0452 + + + + +NAMING_CONVENTION + + + + +BADCASE + + + + +JSON file with several invalid parameter names (3)
+Expected: All names are accepted (in definition and in reference) + + +
+ + + + + + + +71 + + + + + +JPP_0453 + + + + +NAMING_CONVENTION + + + + +BADCASE + + + + +JSON file with several invalid parameter names (4)
+Expected: All names are accepted (in definition and in reference) + + +
+ + + + + + + +72 + + + + + +JPP_0454 + + + + +NAMING_CONVENTION + + + + +BADCASE + + + + +JSON file with several invalid parameter names (5)
+Expected: All names are accepted (in definition and in reference) + + +
+ + + + + + + +73 + + + + + +JPP_0455 + + + + +NAMING_CONVENTION + + + + +BADCASE + + + + +JSON file with several invalid parameter names (6)
+Expected: All names are accepted (in definition and in reference) + + +
+ + + + + + + +74 + + @@ -2303,7 +2501,7 @@ -69 +75 @@ -2337,7 +2535,7 @@ -70 +76 @@ -2371,7 +2569,7 @@ -71 +77 @@ -2404,7 +2602,7 @@ -72 +78 @@ -2437,7 +2635,7 @@ -73 +79 @@ -2470,7 +2668,7 @@ -74 +80 @@ -2503,7 +2701,7 @@ -75 +81 @@ -2536,7 +2734,7 @@ -76 +82 @@ -2569,7 +2767,7 @@ -77 +83 @@ -2602,7 +2800,7 @@ -78 +84 @@ -2635,7 +2833,7 @@ -79 +85 @@ -2668,7 +2866,7 @@ -80 +86 @@ -2701,7 +2899,7 @@ -81 +87 @@ -2734,7 +2932,7 @@ -82 +88 @@ -2767,7 +2965,7 @@ -83 +89 @@ -2800,7 +2998,7 @@ -84 +90 @@ -2833,7 +3031,7 @@ -85 +91 @@ -2867,7 +3065,7 @@ -86 +92 @@ -2901,7 +3099,7 @@ -87 +93 @@ -2934,7 +3132,7 @@ -88 +94 @@ -2967,7 +3165,7 @@ -89 +95 @@ -3000,7 +3198,7 @@ -90 +96 @@ -3033,7 +3231,7 @@ -91 +97 @@ -3066,18 +3264,579 @@ -92 +98 + + + + + +JPP_0950 + + + + +COMMON_SYNTAX_VIOLATIONS + + + + +BADCASE + + + + +JSON file with syntax error (1)
+Expected: No values are returned, and JsonPreprocessor throws an exception + + +
+ + + + + + + +99 + + + + + +JPP_0951 + + + + +COMMON_SYNTAX_VIOLATIONS + + + + +BADCASE + + + + +JSON file with syntax error (2)
+Expected: No values are returned, and JsonPreprocessor throws an exception + + +
+ + + + + + + +100 + + + + + +JPP_0952 + + + + +COMMON_SYNTAX_VIOLATIONS + + + + +BADCASE + + + + +JSON file with syntax error (3)
+Expected: No values are returned, and JsonPreprocessor throws an exception + + +
+ + + + + + + +101 + + + + + +JPP_0953 + + + + +COMMON_SYNTAX_VIOLATIONS + + + + +BADCASE + + + + +JSON file with syntax error (4): file is completely empty
+Expected: No values are returned, and JsonPreprocessor throws an exception + + +
+ + + + + + + +102 + + + + + +JPP_0954 + + + + +COMMON_SYNTAX_VIOLATIONS + + + + +BADCASE + + + + +JSON file with syntax error (5): file is empty (multiple pairs of brackets only)
+Expected: No values are returned, and JsonPreprocessor throws an exception + + +
+ + + + + + + +103 + + + + + +JPP_1000 + + + + +IMPLICIT_CREATION + + + + +GOODCASE + + + + +JSON file with dictionary keys to be created implicitly
+Expected: JsonPreprocessor returns values + + +
+ + + + + + + +104 + + + + + +JPP_1001 + + + + +IMPLICIT_CREATION + + + + +GOODCASE + + + + +JSON file with dictionary keys to be created implicitly (same key names at all levels)
+Expected: JsonPreprocessor returns values + + +
+ + + + + + + +105 + + + + + +JPP_1002 + + + + +IMPLICIT_CREATION + + + + +GOODCASE + + + + +JSON file with combinations of implicit and explicit creation / with and without initialization
+Expected: JsonPreprocessor returns values + + +
+ + + + + + + +106 + + + + + +JPP_1003 + + + + +IMPLICIT_CREATION + + + + +GOODCASE + + + + +JSON file with combinations of implicit and explicit creation / access to implicitly created keys by parameters / dict assignment by reference
+Expected: JsonPreprocessor returns values + + +
+ + + + + + + +107 + + + + + +JPP_1004 + + + + +IMPLICIT_CREATION + + + + +GOODCASE + + + + +JSON file with combinations of ascending and descending dotdict syntax
+Expected: JsonPreprocessor returns values + + +
+ + + + + + + +108 + + + + + +JPP_1050 + + + + +IMPLICIT_CREATION + + + + +BADCASE + + + + +JSON file with implicit creation of data structures based on parameters (1)
+Expected: No values are returned, and JsonPreprocessor throws an exception + + +
+ + + + + + + +109 + + + + + +JPP_1051 + + + + +IMPLICIT_CREATION + + + + +BADCASE + + + + +JSON file with implicit creation of data structures based on parameters (2)
+Expected: No values are returned, and JsonPreprocessor throws an exception + + +
+ + + + + + + +110 + + + + + +JPP_1052 + + + + +IMPLICIT_CREATION + + + + +BADCASE + + + + +JSON file with implicit creation of data structures based on parameters (3)
+Expected: No values are returned, and JsonPreprocessor throws an exception + + +
+ + + + + + + +111 + + + + + +JPP_1053 + + + + +IMPLICIT_CREATION + + + + +BADCASE + + + + +JSON file with implicit creation of data structures based on parameters (4)
+Expected: No values are returned, and JsonPreprocessor throws an exception + + +
+ + + + + + + +112 + + + + + +JPP_1054 + + + + +IMPLICIT_CREATION + + + + +BADCASE + + + + +JSON file with implicit creation of data structures based on parameters (5)
+Expected: No values are returned, and JsonPreprocessor throws an exception + + +
+ + + + + + + +113 + + + + + +JPP_1055 + + + + +IMPLICIT_CREATION + + + + +BADCASE + + + + +JSON file with implicit creation of data structures based on parameters (5)
+Expected: No values are returned, and JsonPreprocessor throws an exception + + +
+ + + + + + + +114 + + + + + +JPP_1056 + + + + +IMPLICIT_CREATION + + + + +BADCASE + + + + +JSON file with implicit creation of data structures based on parameters (6)
+Expected: No values are returned, and JsonPreprocessor throws an exception + + +
+ + + + + + + +115 -JPP_0950 +JPP_1057 -COMMON_SYNTAX_VIOLATIONS +IMPLICIT_CREATION @@ -3087,7 +3846,7 @@ -JSON file with syntax error (1)
+JSON file with implicit creation of data structures based on parameters (7)
Expected: No values are returned, and JsonPreprocessor throws an exception @@ -3099,18 +3858,18 @@ -93 +116 -JPP_0951 +JPP_1058 -COMMON_SYNTAX_VIOLATIONS +IMPLICIT_CREATION @@ -3120,7 +3879,7 @@ -JSON file with syntax error (2)
+JSON file with implicit creation of data structures based on parameters (8)
Expected: No values are returned, and JsonPreprocessor throws an exception @@ -3132,29 +3891,29 @@ -94 +117 -JPP_0952 +JPP_1100 -COMMON_SYNTAX_VIOLATIONS +FILE_IMPORTS - -BADCASE + +GOODCASE -JSON file with syntax error (3)
-Expected: No values are returned, and JsonPreprocessor throws an exception +JSON file import based on parameters (dynamic import (1))
+Expected: JsonPreprocessor returns values
@@ -3165,29 +3924,29 @@ -95 +118 -JPP_0953 +JPP_1101 -COMMON_SYNTAX_VIOLATIONS +FILE_IMPORTS - -BADCASE + +GOODCASE -JSON file with syntax error (4): file is completely empty
-Expected: No values are returned, and JsonPreprocessor throws an exception +JSON file import based on parameters (dynamic import (2))
+Expected: JsonPreprocessor returns values
@@ -3198,29 +3957,29 @@ -96 +119 -JPP_0954 +JPP_1102 -COMMON_SYNTAX_VIOLATIONS +FILE_IMPORTS - -BADCASE + +GOODCASE -JSON file with syntax error (5): file is empty (multiple pairs of brackets only)
-Expected: No values are returned, and JsonPreprocessor throws an exception +JSON file import based on parameters (dynamic import (3))
+Expected: JsonPreprocessor returns values
@@ -3231,18 +3990,18 @@ -97 +120 -JPP_1000 +JPP_1103 -IMPLICIT_CREATION +FILE_IMPORTS @@ -3252,7 +4011,7 @@ -JSON file with dictionary keys to be created implicitly
+JSON file import based on parameters (dynamic import (4))
Expected: JsonPreprocessor returns values @@ -3264,18 +4023,18 @@ -98 +121 -JPP_1001 +JPP_1104 -IMPLICIT_CREATION +FILE_IMPORTS @@ -3285,7 +4044,7 @@ -JSON file with dictionary keys to be created implicitly (same key names at all levels)
+JSON file import based on parameters (dynamic import (5))
Expected: JsonPreprocessor returns values @@ -3297,18 +4056,18 @@ -99 +122 -JPP_1002 +JPP_1105 -IMPLICIT_CREATION +FILE_IMPORTS @@ -3318,7 +4077,7 @@ -JSON file with combinations of implicit and explicit creation / with and without initialization
+JSON file import based on parameters (dynamic import (6))
Expected: JsonPreprocessor returns values @@ -3330,18 +4089,18 @@ -100 +123 -JPP_1003 +JPP_1106 -IMPLICIT_CREATION +FILE_IMPORTS @@ -3351,7 +4110,7 @@ -JSON file with combinations of implicit and explicit creation / access to implicitly created keys by parameters / dict assignment by reference
+JSON file import based on parameters (dynamic import, recursive (7))
Expected: JsonPreprocessor returns values @@ -3363,18 +4122,18 @@ -101 +124 -JPP_1004 +JPP_1107 -IMPLICIT_CREATION +FILE_IMPORTS @@ -3384,9 +4143,10 @@ -JSON file with combinations of ascending and descending dotdict syntax
+JSON file import based on parameters (dynamic import, alternate (8))
Expected: JsonPreprocessor returns values - +
+The recursive import occurs alternately in a dynamic or fixed manner
@@ -3396,30 +4156,31 @@ -102 +125 -JPP_1050 +JPP_1108 -IMPLICIT_CREATION +FILE_IMPORTS - -BADCASE + +GOODCASE -JSON file with implicit creation of data structures based on parameters (1)
-Expected: No values are returned, and JsonPreprocessor throws an exception - +JSON file import based on parameters (dynamic import, parallel (9))
+Expected: JsonPreprocessor returns values +
+The recursive import occurs in two import trees running in parallel with alternately in a dynamic or fixed manner
@@ -3429,29 +4190,29 @@ -103 +126 -JPP_1051 +JPP_1109 -IMPLICIT_CREATION +FILE_IMPORTS - -BADCASE + +GOODCASE -JSON file with implicit creation of data structures based on parameters (2)
-Expected: No values are returned, and JsonPreprocessor throws an exception +JSON file import based on dictionary key values
+Expected: JsonPreprocessor returns values
@@ -3462,29 +4223,29 @@ -104 +127 -JPP_1052 +JPP_1110 -IMPLICIT_CREATION +FILE_IMPORTS - -BADCASE + +GOODCASE -JSON file with implicit creation of data structures based on parameters (3)
-Expected: No values are returned, and JsonPreprocessor throws an exception +JSON file import based on list elemens
+Expected: JsonPreprocessor returns values
@@ -3495,29 +4256,29 @@ -105 +128 -JPP_1053 +JPP_1111 -IMPLICIT_CREATION +FILE_IMPORTS - -BADCASE + +GOODCASE -JSON file with implicit creation of data structures based on parameters (4)
-Expected: No values are returned, and JsonPreprocessor throws an exception +JSON file import based on parameters (dynamic import (7))
+Expected: JsonPreprocessor returns values
@@ -3528,18 +4289,18 @@ -106 +129 -JPP_1054 +JPP_1150 -IMPLICIT_CREATION +FILE_IMPORTS @@ -3549,9 +4310,10 @@ -JSON file with implicit creation of data structures based on parameters (5)
+JSON file with cyclic imports (JSON file imports itself, fix path)
Expected: No values are returned, and JsonPreprocessor throws an exception - +
+Cyclic import
@@ -3561,18 +4323,18 @@ -107 +130 -JPP_1055 +JPP_1151 -IMPLICIT_CREATION +FILE_IMPORTS @@ -3582,9 +4344,10 @@ -JSON file with implicit creation of data structures based on parameters (5)
+JSON file with cyclic imports (JSON file imports another file, that is already imported, fix path)
Expected: No values are returned, and JsonPreprocessor throws an exception - +
+Cyclic import
@@ -3594,18 +4357,18 @@ -108 +131 -JPP_1056 +JPP_1154 -IMPLICIT_CREATION +FILE_IMPORTS @@ -3615,7 +4378,7 @@ -JSON file with implicit creation of data structures based on parameters (6)
+JSON file with not existing parameter within dynamic import path
Expected: No values are returned, and JsonPreprocessor throws an exception @@ -3627,18 +4390,18 @@ -109 +132 -JPP_1057 +JPP_1155 -IMPLICIT_CREATION +FILE_IMPORTS @@ -3648,7 +4411,7 @@ -JSON file with implicit creation of data structures based on parameters (7)
+JSON file with not existing import file
Expected: No values are returned, and JsonPreprocessor throws an exception @@ -3660,18 +4423,18 @@ -110 +133 -JPP_1058 +JPP_1158 -IMPLICIT_CREATION +FILE_IMPORTS @@ -3681,7 +4444,7 @@ -JSON file with implicit creation of data structures based on parameters (8)
+JSON file with error in [import] key (1)
Expected: No values are returned, and JsonPreprocessor throws an exception @@ -3693,18 +4456,18 @@ -111 +134 -JPP_1150 +JPP_1159 -CYCLIC_IMPORTS +FILE_IMPORTS @@ -3714,7 +4477,7 @@ -JSON file with cyclic imports (JSON file imports itself)
+JSON file with error in [import] key (2)
Expected: No values are returned, and JsonPreprocessor throws an exception @@ -3726,18 +4489,18 @@ -112 +135 -JPP_1151 +JPP_1160 -CYCLIC_IMPORTS +FILE_IMPORTS @@ -3747,7 +4510,7 @@ -JSON file with cyclic imports (JSON file imports another file, that is already imported)
+JSON file with error in imported file
Expected: No values are returned, and JsonPreprocessor throws an exception @@ -3759,7 +4522,7 @@ -113 +136 @@ -3793,7 +4556,7 @@ -114 +137 @@ -3826,7 +4589,7 @@ -115 +138 @@ -3859,7 +4622,7 @@ -116 +139 @@ -3892,7 +4655,7 @@ -117 +140 @@ -3925,7 +4688,7 @@ -118 +141 @@ -3958,7 +4721,7 @@ -119 +142 @@ -3991,7 +4754,7 @@ -120 +143 @@ -4024,7 +4787,7 @@ -121 +144 @@ -4057,7 +4820,7 @@ -122 +145 @@ -4090,7 +4853,7 @@ -123 +146 @@ -4123,7 +4886,7 @@ -124 +147 @@ -4156,7 +4919,7 @@ -125 +148 @@ -4189,7 +4952,7 @@ -126 +149 @@ -4222,7 +4985,7 @@ -127 +150 @@ -4255,7 +5018,7 @@ -128 +151 @@ -4288,7 +5051,7 @@ -129 +152 @@ -4321,7 +5084,7 @@ -130 +153 @@ -4354,7 +5117,7 @@ -131 +154 @@ -4387,7 +5150,7 @@ -132 +155 @@ -4420,7 +5183,7 @@ -133 +156 @@ -4453,7 +5216,7 @@ -134 +157 @@ -4486,7 +5249,7 @@ -135 +158 @@ -4519,7 +5282,7 @@ -136 +159 @@ -4552,7 +5315,7 @@ -137 +160 @@ -4585,7 +5348,7 @@ -138 +161 @@ -4618,7 +5381,7 @@ -139 +162 @@ -4651,7 +5414,7 @@ -140 +163 @@ -4684,7 +5447,7 @@ -141 +164 @@ -4717,7 +5480,7 @@ -142 +165 @@ -4750,7 +5513,7 @@ -143 +166 @@ -4783,7 +5546,7 @@ -144 +167 @@ -4816,7 +5579,7 @@ -145 +168 @@ -4849,7 +5612,7 @@ -146 +169 @@ -4882,7 +5645,7 @@ -147 +170 @@ -4915,7 +5678,7 @@ -148 +171 @@ -4948,7 +5711,7 @@ -149 +172 @@ -4981,7 +5744,7 @@ -150 +173 @@ -5014,7 +5777,7 @@ -151 +174 @@ -5047,7 +5810,7 @@ -152 +175 @@ -5080,7 +5843,7 @@ -153 +176 @@ -5113,7 +5876,7 @@ -154 +177 @@ -5146,7 +5909,7 @@ -155 +178 @@ -5179,7 +5942,7 @@ -156 +179 @@ -5212,13 +5975,13 @@ -157 +180 -JPP_2500 +JPP_2050 @@ -5234,7 +5997,7 @@ JSON file containing a parameter with missing scope (1)
-Expected: JsonPreprocessor returns expected value +Expected: No values are returned, and JsonPreprocessor throws an exception
@@ -5245,13 +6008,13 @@ -158 +181 -JPP_2501 +JPP_2051 @@ -5267,7 +6030,7 @@ JSON file containing a parameter with missing scope (2)
-Expected: JsonPreprocessor returns expected value +Expected: No values are returned, and JsonPreprocessor throws an exception
@@ -5278,13 +6041,13 @@ -159 +182 -JPP_2502 +JPP_2052 @@ -5300,7 +6063,7 @@ JSON file containing a parameter with missing scope (3)
-Expected: JsonPreprocessor returns expected value +Expected: No values are returned, and JsonPreprocessor throws an exception
@@ -5311,13 +6074,13 @@ -160 +183 -JPP_2503 +JPP_2053 @@ -5333,7 +6096,7 @@ JSON file containing a parameter with missing scope (4)
-Expected: JsonPreprocessor returns expected value +Expected: No values are returned, and JsonPreprocessor throws an exception
@@ -5344,13 +6107,13 @@ -161 +184 -JPP_2504 +JPP_2054 @@ -5366,7 +6129,7 @@ JSON file containing a parameter with missing scope (5)
-Expected: JsonPreprocessor returns expected value +Expected: No values are returned, and JsonPreprocessor throws an exception
@@ -5377,13 +6140,13 @@ -162 +185 -JPP_2506 +JPP_2056 @@ -5399,7 +6162,7 @@ JSON file containing a parameter with missing scope (7)
-Expected: JsonPreprocessor returns expected value +Expected: No values are returned, and JsonPreprocessor throws an exception
@@ -5410,13 +6173,13 @@ -163 +186 -JPP_2507 +JPP_2057 @@ -5432,7 +6195,7 @@ JSON file containing a parameter with missing scope (8)
-Expected: JsonPreprocessor returns expected value +Expected: No values are returned, and JsonPreprocessor throws an exception
@@ -5443,13 +6206,13 @@ -164 +187 -JPP_2508 +JPP_2058 @@ -5465,7 +6228,7 @@ JSON file containing a parameter with missing scope (9)
-Expected: JsonPreprocessor returns expected value +Expected: No values are returned, and JsonPreprocessor throws an exception
@@ -5476,7 +6239,7 @@
 

-
Generated: 25.10.2024 - 20:21:51
+
Generated: 14.11.2024 - 15:38:04
 
diff --git a/test/JPP_TestUsecases.rst b/test/JPP_TestUsecases.rst index 9d46a977..310f6569 100644 --- a/test/JPP_TestUsecases.rst +++ b/test/JPP_TestUsecases.rst @@ -739,6 +739,66 @@ Test Use Cases ---- +* **Test JPP_0450** + + [NAMING_CONVENTION / BADCASE] + + **JSON file with several invalid parameter names (1)** + + Expected: All names are accepted (in definition and in reference) + +---- + +* **Test JPP_0451** + + [NAMING_CONVENTION / BADCASE] + + **JSON file with several invalid parameter names (2)** + + Expected: All names are accepted (in definition and in reference) + +---- + +* **Test JPP_0452** + + [NAMING_CONVENTION / BADCASE] + + **JSON file with several invalid parameter names (3)** + + Expected: All names are accepted (in definition and in reference) + +---- + +* **Test JPP_0453** + + [NAMING_CONVENTION / BADCASE] + + **JSON file with several invalid parameter names (4)** + + Expected: All names are accepted (in definition and in reference) + +---- + +* **Test JPP_0454** + + [NAMING_CONVENTION / BADCASE] + + **JSON file with several invalid parameter names (5)** + + Expected: All names are accepted (in definition and in reference) + +---- + +* **Test JPP_0455** + + [NAMING_CONVENTION / BADCASE] + + **JSON file with several invalid parameter names (6)** + + Expected: All names are accepted (in definition and in reference) + +---- + * **Test JPP_0500** [COMPOSITE_EXPRESSIONS / GOODCASE] @@ -1179,21 +1239,199 @@ Test Use Cases ---- +* **Test JPP_1100** + + [FILE_IMPORTS / GOODCASE] + + **JSON file import based on parameters (dynamic import (1))** + + Expected: JsonPreprocessor returns values + +---- + +* **Test JPP_1101** + + [FILE_IMPORTS / GOODCASE] + + **JSON file import based on parameters (dynamic import (2))** + + Expected: JsonPreprocessor returns values + +---- + +* **Test JPP_1102** + + [FILE_IMPORTS / GOODCASE] + + **JSON file import based on parameters (dynamic import (3))** + + Expected: JsonPreprocessor returns values + +---- + +* **Test JPP_1103** + + [FILE_IMPORTS / GOODCASE] + + **JSON file import based on parameters (dynamic import (4))** + + Expected: JsonPreprocessor returns values + +---- + +* **Test JPP_1104** + + [FILE_IMPORTS / GOODCASE] + + **JSON file import based on parameters (dynamic import (5))** + + Expected: JsonPreprocessor returns values + +---- + +* **Test JPP_1105** + + [FILE_IMPORTS / GOODCASE] + + **JSON file import based on parameters (dynamic import (6))** + + Expected: JsonPreprocessor returns values + +---- + +* **Test JPP_1106** + + [FILE_IMPORTS / GOODCASE] + + **JSON file import based on parameters (dynamic import, recursive (7))** + + Expected: JsonPreprocessor returns values + +---- + +* **Test JPP_1107** + + [FILE_IMPORTS / GOODCASE] + + **JSON file import based on parameters (dynamic import, alternate (8))** + + Expected: JsonPreprocessor returns values + + *Comment: The recursive import occurs alternately in a dynamic or fixed manner* + +---- + +* **Test JPP_1108** + + [FILE_IMPORTS / GOODCASE] + + **JSON file import based on parameters (dynamic import, parallel (9))** + + Expected: JsonPreprocessor returns values + + *Comment: The recursive import occurs in two import trees running in parallel with alternately in a dynamic or fixed manner* + +---- + +* **Test JPP_1109** + + [FILE_IMPORTS / GOODCASE] + + **JSON file import based on dictionary key values** + + Expected: JsonPreprocessor returns values + +---- + +* **Test JPP_1110** + + [FILE_IMPORTS / GOODCASE] + + **JSON file import based on list elemens** + + Expected: JsonPreprocessor returns values + +---- + +* **Test JPP_1111** + + [FILE_IMPORTS / GOODCASE] + + **JSON file import based on parameters (dynamic import (7))** + + Expected: JsonPreprocessor returns values + +---- + * **Test JPP_1150** - [CYCLIC_IMPORTS / BADCASE] + [FILE_IMPORTS / BADCASE] - **JSON file with cyclic imports (JSON file imports itself)** + **JSON file with cyclic imports (JSON file imports itself, fix path)** Expected: No values are returned, and JsonPreprocessor throws an exception + *Comment: Cyclic import* + ---- * **Test JPP_1151** - [CYCLIC_IMPORTS / BADCASE] + [FILE_IMPORTS / BADCASE] + + **JSON file with cyclic imports (JSON file imports another file, that is already imported, fix path)** + + Expected: No values are returned, and JsonPreprocessor throws an exception + + *Comment: Cyclic import* + +---- + +* **Test JPP_1154** - **JSON file with cyclic imports (JSON file imports another file, that is already imported)** + [FILE_IMPORTS / BADCASE] + + **JSON file with not existing parameter within dynamic import path** + + Expected: No values are returned, and JsonPreprocessor throws an exception + +---- + +* **Test JPP_1155** + + [FILE_IMPORTS / BADCASE] + + **JSON file with not existing import file** + + Expected: No values are returned, and JsonPreprocessor throws an exception + +---- + +* **Test JPP_1158** + + [FILE_IMPORTS / BADCASE] + + **JSON file with error in [import] key (1)** + + Expected: No values are returned, and JsonPreprocessor throws an exception + +---- + +* **Test JPP_1159** + + [FILE_IMPORTS / BADCASE] + + **JSON file with error in [import] key (2)** + + Expected: No values are returned, and JsonPreprocessor throws an exception + +---- + +* **Test JPP_1160** + + [FILE_IMPORTS / BADCASE] + + **JSON file with error in imported file** Expected: No values are returned, and JsonPreprocessor throws an exception @@ -1641,85 +1879,85 @@ Test Use Cases ---- -* **Test JPP_2500** +* **Test JPP_2050** [PARAMETER_SCOPE / BADCASE] **JSON file containing a parameter with missing scope (1)** - Expected: JsonPreprocessor returns expected value + Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_2501** +* **Test JPP_2051** [PARAMETER_SCOPE / BADCASE] **JSON file containing a parameter with missing scope (2)** - Expected: JsonPreprocessor returns expected value + Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_2502** +* **Test JPP_2052** [PARAMETER_SCOPE / BADCASE] **JSON file containing a parameter with missing scope (3)** - Expected: JsonPreprocessor returns expected value + Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_2503** +* **Test JPP_2053** [PARAMETER_SCOPE / BADCASE] **JSON file containing a parameter with missing scope (4)** - Expected: JsonPreprocessor returns expected value + Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_2504** +* **Test JPP_2054** [PARAMETER_SCOPE / BADCASE] **JSON file containing a parameter with missing scope (5)** - Expected: JsonPreprocessor returns expected value + Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_2506** +* **Test JPP_2056** [PARAMETER_SCOPE / BADCASE] **JSON file containing a parameter with missing scope (7)** - Expected: JsonPreprocessor returns expected value + Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_2507** +* **Test JPP_2057** [PARAMETER_SCOPE / BADCASE] **JSON file containing a parameter with missing scope (8)** - Expected: JsonPreprocessor returns expected value + Expected: No values are returned, and JsonPreprocessor throws an exception ---- -* **Test JPP_2508** +* **Test JPP_2058** [PARAMETER_SCOPE / BADCASE] **JSON file containing a parameter with missing scope (9)** - Expected: JsonPreprocessor returns expected value + Expected: No values are returned, and JsonPreprocessor throws an exception ---- -Generated: 25.10.2024 - 20:21:51 +Generated: 14.11.2024 - 15:38:04 diff --git a/test/JPP_TestUsecases.txt b/test/JPP_TestUsecases.txt index 2b0cf434..860b0c68 100644 --- a/test/JPP_TestUsecases.txt +++ b/test/JPP_TestUsecases.txt @@ -310,6 +310,30 @@ Test JPP_0400 / NAMING_CONVENTION / GOODCASE Description: JSON file with several parameter names w.r.t. the naming convention Expectation: All names are accepted (in definition and in reference) ------------------------------------------------------------------------------------------------------------------------ +Test JPP_0450 / NAMING_CONVENTION / BADCASE +Description: JSON file with several invalid parameter names (1) +Expectation: All names are accepted (in definition and in reference) +------------------------------------------------------------------------------------------------------------------------ +Test JPP_0451 / NAMING_CONVENTION / BADCASE +Description: JSON file with several invalid parameter names (2) +Expectation: All names are accepted (in definition and in reference) +------------------------------------------------------------------------------------------------------------------------ +Test JPP_0452 / NAMING_CONVENTION / BADCASE +Description: JSON file with several invalid parameter names (3) +Expectation: All names are accepted (in definition and in reference) +------------------------------------------------------------------------------------------------------------------------ +Test JPP_0453 / NAMING_CONVENTION / BADCASE +Description: JSON file with several invalid parameter names (4) +Expectation: All names are accepted (in definition and in reference) +------------------------------------------------------------------------------------------------------------------------ +Test JPP_0454 / NAMING_CONVENTION / BADCASE +Description: JSON file with several invalid parameter names (5) +Expectation: All names are accepted (in definition and in reference) +------------------------------------------------------------------------------------------------------------------------ +Test JPP_0455 / NAMING_CONVENTION / BADCASE +Description: JSON file with several invalid parameter names (6) +Expectation: All names are accepted (in definition and in reference) +------------------------------------------------------------------------------------------------------------------------ Test JPP_0500 / COMPOSITE_EXPRESSIONS / GOODCASE Description: JSON file with composite data structure (nested lists and dictionaries 1) Expectation: JsonPreprocessor returns expected value @@ -487,12 +511,84 @@ Test JPP_1058 / IMPLICIT_CREATION / BADCASE Description: JSON file with implicit creation of data structures based on parameters (8) Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ -Test JPP_1150 / CYCLIC_IMPORTS / BADCASE -Description: JSON file with cyclic imports (JSON file imports itself) +Test JPP_1100 / FILE_IMPORTS / GOODCASE +Description: JSON file import based on parameters (dynamic import (1)) +Expectation: JsonPreprocessor returns values +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1101 / FILE_IMPORTS / GOODCASE +Description: JSON file import based on parameters (dynamic import (2)) +Expectation: JsonPreprocessor returns values +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1102 / FILE_IMPORTS / GOODCASE +Description: JSON file import based on parameters (dynamic import (3)) +Expectation: JsonPreprocessor returns values +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1103 / FILE_IMPORTS / GOODCASE +Description: JSON file import based on parameters (dynamic import (4)) +Expectation: JsonPreprocessor returns values +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1104 / FILE_IMPORTS / GOODCASE +Description: JSON file import based on parameters (dynamic import (5)) +Expectation: JsonPreprocessor returns values +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1105 / FILE_IMPORTS / GOODCASE +Description: JSON file import based on parameters (dynamic import (6)) +Expectation: JsonPreprocessor returns values +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1106 / FILE_IMPORTS / GOODCASE +Description: JSON file import based on parameters (dynamic import, recursive (7)) +Expectation: JsonPreprocessor returns values +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1107 / FILE_IMPORTS / GOODCASE +Description: JSON file import based on parameters (dynamic import, alternate (8)) +Expectation: JsonPreprocessor returns values +Comment....: The recursive import occurs alternately in a dynamic or fixed manner +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1108 / FILE_IMPORTS / GOODCASE +Description: JSON file import based on parameters (dynamic import, parallel (9)) +Expectation: JsonPreprocessor returns values +Comment....: The recursive import occurs in two import trees running in parallel with alternately in a dynamic or fixed manner +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1109 / FILE_IMPORTS / GOODCASE +Description: JSON file import based on dictionary key values +Expectation: JsonPreprocessor returns values +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1110 / FILE_IMPORTS / GOODCASE +Description: JSON file import based on list elemens +Expectation: JsonPreprocessor returns values +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1111 / FILE_IMPORTS / GOODCASE +Description: JSON file import based on parameters (dynamic import (7)) +Expectation: JsonPreprocessor returns values +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1150 / FILE_IMPORTS / BADCASE +Description: JSON file with cyclic imports (JSON file imports itself, fix path) +Expectation: No values are returned, and JsonPreprocessor throws an exception +Comment....: Cyclic import +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1151 / FILE_IMPORTS / BADCASE +Description: JSON file with cyclic imports (JSON file imports another file, that is already imported, fix path) +Expectation: No values are returned, and JsonPreprocessor throws an exception +Comment....: Cyclic import +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1154 / FILE_IMPORTS / BADCASE +Description: JSON file with not existing parameter within dynamic import path +Expectation: No values are returned, and JsonPreprocessor throws an exception +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1155 / FILE_IMPORTS / BADCASE +Description: JSON file with not existing import file +Expectation: No values are returned, and JsonPreprocessor throws an exception +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1158 / FILE_IMPORTS / BADCASE +Description: JSON file with error in [import] key (1) +Expectation: No values are returned, and JsonPreprocessor throws an exception +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1159 / FILE_IMPORTS / BADCASE +Description: JSON file with error in [import] key (2) Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ -Test JPP_1151 / CYCLIC_IMPORTS / BADCASE -Description: JSON file with cyclic imports (JSON file imports another file, that is already imported) +Test JPP_1160 / FILE_IMPORTS / BADCASE +Description: JSON file with error in imported file Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ Test JPP_1200 / PATH_FORMATS / GOODCASE @@ -672,37 +768,37 @@ Test JPP_2007 / PARAMETER_SCOPE / GOODCASE Description: JSON file with nested dictionary, in which a parameter is overwritten (8) Expectation: JsonPreprocessor returns expected value ------------------------------------------------------------------------------------------------------------------------ -Test JPP_2500 / PARAMETER_SCOPE / BADCASE +Test JPP_2050 / PARAMETER_SCOPE / BADCASE Description: JSON file containing a parameter with missing scope (1) -Expectation: JsonPreprocessor returns expected value +Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ -Test JPP_2501 / PARAMETER_SCOPE / BADCASE +Test JPP_2051 / PARAMETER_SCOPE / BADCASE Description: JSON file containing a parameter with missing scope (2) -Expectation: JsonPreprocessor returns expected value +Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ -Test JPP_2502 / PARAMETER_SCOPE / BADCASE +Test JPP_2052 / PARAMETER_SCOPE / BADCASE Description: JSON file containing a parameter with missing scope (3) -Expectation: JsonPreprocessor returns expected value +Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ -Test JPP_2503 / PARAMETER_SCOPE / BADCASE +Test JPP_2053 / PARAMETER_SCOPE / BADCASE Description: JSON file containing a parameter with missing scope (4) -Expectation: JsonPreprocessor returns expected value +Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ -Test JPP_2504 / PARAMETER_SCOPE / BADCASE +Test JPP_2054 / PARAMETER_SCOPE / BADCASE Description: JSON file containing a parameter with missing scope (5) -Expectation: JsonPreprocessor returns expected value +Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ -Test JPP_2506 / PARAMETER_SCOPE / BADCASE +Test JPP_2056 / PARAMETER_SCOPE / BADCASE Description: JSON file containing a parameter with missing scope (7) -Expectation: JsonPreprocessor returns expected value +Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ -Test JPP_2507 / PARAMETER_SCOPE / BADCASE +Test JPP_2057 / PARAMETER_SCOPE / BADCASE Description: JSON file containing a parameter with missing scope (8) -Expectation: JsonPreprocessor returns expected value +Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ -Test JPP_2508 / PARAMETER_SCOPE / BADCASE +Test JPP_2058 / PARAMETER_SCOPE / BADCASE Description: JSON file containing a parameter with missing scope (9) -Expectation: JsonPreprocessor returns expected value +Expectation: No values are returned, and JsonPreprocessor throws an exception ------------------------------------------------------------------------------------------------------------------------ -Generated: 25.10.2024 - 20:21:51 +Generated: 14.11.2024 - 15:38:04 diff --git a/test/component_test.py b/test/component_test.py index c110ed1f..29dbbc3b 100644 --- a/test/component_test.py +++ b/test/component_test.py @@ -22,8 +22,8 @@ # # -------------------------------------------------------------------------------------------------------------- # -VERSION = "0.48.1" -VERSION_DATE = "25.10.2024" +VERSION = "0.52.0" +VERSION_DATE = "14.11.2024" # # -------------------------------------------------------------------------------------------------------------- #TM*** diff --git a/test/pytest/pytestfiles/test_08_NAMING_CONVENTION_BADCASE.py b/test/pytest/pytestfiles/test_08_NAMING_CONVENTION_BADCASE.py new file mode 100644 index 00000000..7b3484b7 --- /dev/null +++ b/test/pytest/pytestfiles/test_08_NAMING_CONVENTION_BADCASE.py @@ -0,0 +1,80 @@ +# ************************************************************************************************************** +# Copyright 2020-2023 Robert Bosch GmbH +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# -------------------------------------------------------------------------------------------------------------- +# +# test_08_NAMING_CONVENTION_BADCASE.py +# +# XC-HWP/ESW3-Queckenstedt +# +# 28.10.2024 - 20:15:13 +# +# -------------------------------------------------------------------------------------------------------------- + +import pytest +from pytestlibs.CExecute import CExecute + +# -------------------------------------------------------------------------------------------------------------- + +class Test_NAMING_CONVENTION_BADCASE: + +# -------------------------------------------------------------------------------------------------------------- + # Expected: All names are accepted (in definition and in reference) + @pytest.mark.parametrize( + "Description", ["JSON file with several invalid parameter names (1)",] + ) + def test_JPP_0450(self, Description): + nReturn = CExecute.Execute("JPP_0450") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: All names are accepted (in definition and in reference) + @pytest.mark.parametrize( + "Description", ["JSON file with several invalid parameter names (2)",] + ) + def test_JPP_0451(self, Description): + nReturn = CExecute.Execute("JPP_0451") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: All names are accepted (in definition and in reference) + @pytest.mark.parametrize( + "Description", ["JSON file with several invalid parameter names (3)",] + ) + def test_JPP_0452(self, Description): + nReturn = CExecute.Execute("JPP_0452") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: All names are accepted (in definition and in reference) + @pytest.mark.parametrize( + "Description", ["JSON file with several invalid parameter names (4)",] + ) + def test_JPP_0453(self, Description): + nReturn = CExecute.Execute("JPP_0453") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: All names are accepted (in definition and in reference) + @pytest.mark.parametrize( + "Description", ["JSON file with several invalid parameter names (5)",] + ) + def test_JPP_0454(self, Description): + nReturn = CExecute.Execute("JPP_0454") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: All names are accepted (in definition and in reference) + @pytest.mark.parametrize( + "Description", ["JSON file with several invalid parameter names (6)",] + ) + def test_JPP_0455(self, Description): + nReturn = CExecute.Execute("JPP_0455") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_08_COMPOSITE_EXPRESSIONS_GOODCASE.py b/test/pytest/pytestfiles/test_09_COMPOSITE_EXPRESSIONS_GOODCASE.py similarity index 99% rename from test/pytest/pytestfiles/test_08_COMPOSITE_EXPRESSIONS_GOODCASE.py rename to test/pytest/pytestfiles/test_09_COMPOSITE_EXPRESSIONS_GOODCASE.py index 7940b512..77bac8f6 100644 --- a/test/pytest/pytestfiles/test_08_COMPOSITE_EXPRESSIONS_GOODCASE.py +++ b/test/pytest/pytestfiles/test_09_COMPOSITE_EXPRESSIONS_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_08_COMPOSITE_EXPRESSIONS_GOODCASE.py +# test_09_COMPOSITE_EXPRESSIONS_GOODCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 28.10.2024 - 20:15:13 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_09_COMPOSITE_EXPRESSIONS_BADCASE.py b/test/pytest/pytestfiles/test_10_COMPOSITE_EXPRESSIONS_BADCASE.py similarity index 98% rename from test/pytest/pytestfiles/test_09_COMPOSITE_EXPRESSIONS_BADCASE.py rename to test/pytest/pytestfiles/test_10_COMPOSITE_EXPRESSIONS_BADCASE.py index 5f4fad9f..875b9e00 100644 --- a/test/pytest/pytestfiles/test_09_COMPOSITE_EXPRESSIONS_BADCASE.py +++ b/test/pytest/pytestfiles/test_10_COMPOSITE_EXPRESSIONS_BADCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_09_COMPOSITE_EXPRESSIONS_BADCASE.py +# test_10_COMPOSITE_EXPRESSIONS_BADCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 28.10.2024 - 20:15:13 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_10_CODE_COMMENTS_GOODCASE.py b/test/pytest/pytestfiles/test_11_CODE_COMMENTS_GOODCASE.py similarity index 96% rename from test/pytest/pytestfiles/test_10_CODE_COMMENTS_GOODCASE.py rename to test/pytest/pytestfiles/test_11_CODE_COMMENTS_GOODCASE.py index f6691e0a..54a6e275 100644 --- a/test/pytest/pytestfiles/test_10_CODE_COMMENTS_GOODCASE.py +++ b/test/pytest/pytestfiles/test_11_CODE_COMMENTS_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_10_CODE_COMMENTS_GOODCASE.py +# test_11_CODE_COMMENTS_GOODCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 28.10.2024 - 20:15:13 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_11_COMMON_SYNTAX_VIOLATIONS_BADCASE.py b/test/pytest/pytestfiles/test_12_COMMON_SYNTAX_VIOLATIONS_BADCASE.py similarity index 97% rename from test/pytest/pytestfiles/test_11_COMMON_SYNTAX_VIOLATIONS_BADCASE.py rename to test/pytest/pytestfiles/test_12_COMMON_SYNTAX_VIOLATIONS_BADCASE.py index d9bbfa14..efd2e0d8 100644 --- a/test/pytest/pytestfiles/test_11_COMMON_SYNTAX_VIOLATIONS_BADCASE.py +++ b/test/pytest/pytestfiles/test_12_COMMON_SYNTAX_VIOLATIONS_BADCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_11_COMMON_SYNTAX_VIOLATIONS_BADCASE.py +# test_12_COMMON_SYNTAX_VIOLATIONS_BADCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 28.10.2024 - 20:15:13 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_12_IMPLICIT_CREATION_GOODCASE.py b/test/pytest/pytestfiles/test_13_IMPLICIT_CREATION_GOODCASE.py similarity index 98% rename from test/pytest/pytestfiles/test_12_IMPLICIT_CREATION_GOODCASE.py rename to test/pytest/pytestfiles/test_13_IMPLICIT_CREATION_GOODCASE.py index 10cc388a..eeb952f4 100644 --- a/test/pytest/pytestfiles/test_12_IMPLICIT_CREATION_GOODCASE.py +++ b/test/pytest/pytestfiles/test_13_IMPLICIT_CREATION_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_12_IMPLICIT_CREATION_GOODCASE.py +# test_13_IMPLICIT_CREATION_GOODCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 28.10.2024 - 20:15:13 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_14_CYCLIC_IMPORTS_BADCASE.py b/test/pytest/pytestfiles/test_14_CYCLIC_IMPORTS_BADCASE.py deleted file mode 100644 index 63ba8d9a..00000000 --- a/test/pytest/pytestfiles/test_14_CYCLIC_IMPORTS_BADCASE.py +++ /dev/null @@ -1,48 +0,0 @@ -# ************************************************************************************************************** -# Copyright 2020-2023 Robert Bosch GmbH -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -------------------------------------------------------------------------------------------------------------- -# -# test_14_CYCLIC_IMPORTS_BADCASE.py -# -# XC-HWP/ESW3-Queckenstedt -# -# 25.10.2024 - 20:31:28 -# -# -------------------------------------------------------------------------------------------------------------- - -import pytest -from pytestlibs.CExecute import CExecute - -# -------------------------------------------------------------------------------------------------------------- - -class Test_CYCLIC_IMPORTS_BADCASE: - -# -------------------------------------------------------------------------------------------------------------- - # Expected: No values are returned, and JsonPreprocessor throws an exception - @pytest.mark.parametrize( - "Description", ["JSON file with cyclic imports (JSON file imports itself)",] - ) - def test_JPP_1150(self, Description): - nReturn = CExecute.Execute("JPP_1150") - assert nReturn == 0 -# -------------------------------------------------------------------------------------------------------------- - # Expected: No values are returned, and JsonPreprocessor throws an exception - @pytest.mark.parametrize( - "Description", ["JSON file with cyclic imports (JSON file imports another file, that is already imported)",] - ) - def test_JPP_1151(self, Description): - nReturn = CExecute.Execute("JPP_1151") - assert nReturn == 0 -# -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_13_IMPLICIT_CREATION_BADCASE.py b/test/pytest/pytestfiles/test_14_IMPLICIT_CREATION_BADCASE.py similarity index 98% rename from test/pytest/pytestfiles/test_13_IMPLICIT_CREATION_BADCASE.py rename to test/pytest/pytestfiles/test_14_IMPLICIT_CREATION_BADCASE.py index ebea1965..79f20f60 100644 --- a/test/pytest/pytestfiles/test_13_IMPLICIT_CREATION_BADCASE.py +++ b/test/pytest/pytestfiles/test_14_IMPLICIT_CREATION_BADCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_13_IMPLICIT_CREATION_BADCASE.py +# test_14_IMPLICIT_CREATION_BADCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 28.10.2024 - 20:15:13 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_15_FILE_IMPORTS_GOODCASE.py b/test/pytest/pytestfiles/test_15_FILE_IMPORTS_GOODCASE.py new file mode 100644 index 00000000..c3680cec --- /dev/null +++ b/test/pytest/pytestfiles/test_15_FILE_IMPORTS_GOODCASE.py @@ -0,0 +1,128 @@ +# ************************************************************************************************************** +# Copyright 2020-2023 Robert Bosch GmbH +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# -------------------------------------------------------------------------------------------------------------- +# +# test_15_FILE_IMPORTS_GOODCASE.py +# +# XC-HWP/ESW3-Queckenstedt +# +# 14.11.2024 - 15:38:04 +# +# -------------------------------------------------------------------------------------------------------------- + +import pytest +from pytestlibs.CExecute import CExecute + +# -------------------------------------------------------------------------------------------------------------- + +class Test_FILE_IMPORTS_GOODCASE: + +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns values + @pytest.mark.parametrize( + "Description", ["JSON file import based on parameters (dynamic import (1))",] + ) + def test_JPP_1100(self, Description): + nReturn = CExecute.Execute("JPP_1100") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns values + @pytest.mark.parametrize( + "Description", ["JSON file import based on parameters (dynamic import (2))",] + ) + def test_JPP_1101(self, Description): + nReturn = CExecute.Execute("JPP_1101") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns values + @pytest.mark.parametrize( + "Description", ["JSON file import based on parameters (dynamic import (3))",] + ) + def test_JPP_1102(self, Description): + nReturn = CExecute.Execute("JPP_1102") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns values + @pytest.mark.parametrize( + "Description", ["JSON file import based on parameters (dynamic import (4))",] + ) + def test_JPP_1103(self, Description): + nReturn = CExecute.Execute("JPP_1103") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns values + @pytest.mark.parametrize( + "Description", ["JSON file import based on parameters (dynamic import (5))",] + ) + def test_JPP_1104(self, Description): + nReturn = CExecute.Execute("JPP_1104") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns values + @pytest.mark.parametrize( + "Description", ["JSON file import based on parameters (dynamic import (6))",] + ) + def test_JPP_1105(self, Description): + nReturn = CExecute.Execute("JPP_1105") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns values + @pytest.mark.parametrize( + "Description", ["JSON file import based on parameters (dynamic import, recursive (7))",] + ) + def test_JPP_1106(self, Description): + nReturn = CExecute.Execute("JPP_1106") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns values + @pytest.mark.parametrize( + "Description", ["JSON file import based on parameters (dynamic import, alternate (8))",] + ) + def test_JPP_1107(self, Description): + nReturn = CExecute.Execute("JPP_1107") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns values + @pytest.mark.parametrize( + "Description", ["JSON file import based on parameters (dynamic import, parallel (9))",] + ) + def test_JPP_1108(self, Description): + nReturn = CExecute.Execute("JPP_1108") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns values + @pytest.mark.parametrize( + "Description", ["JSON file import based on dictionary key values",] + ) + def test_JPP_1109(self, Description): + nReturn = CExecute.Execute("JPP_1109") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns values + @pytest.mark.parametrize( + "Description", ["JSON file import based on list elemens",] + ) + def test_JPP_1110(self, Description): + nReturn = CExecute.Execute("JPP_1110") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns values + @pytest.mark.parametrize( + "Description", ["JSON file import based on parameters (dynamic import (7))",] + ) + def test_JPP_1111(self, Description): + nReturn = CExecute.Execute("JPP_1111") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_16_FILE_IMPORTS_BADCASE.py b/test/pytest/pytestfiles/test_16_FILE_IMPORTS_BADCASE.py new file mode 100644 index 00000000..929e4fe1 --- /dev/null +++ b/test/pytest/pytestfiles/test_16_FILE_IMPORTS_BADCASE.py @@ -0,0 +1,88 @@ +# ************************************************************************************************************** +# Copyright 2020-2023 Robert Bosch GmbH +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# -------------------------------------------------------------------------------------------------------------- +# +# test_16_FILE_IMPORTS_BADCASE.py +# +# XC-HWP/ESW3-Queckenstedt +# +# 14.11.2024 - 15:38:04 +# +# -------------------------------------------------------------------------------------------------------------- + +import pytest +from pytestlibs.CExecute import CExecute + +# -------------------------------------------------------------------------------------------------------------- + +class Test_FILE_IMPORTS_BADCASE: + +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file with cyclic imports (JSON file imports itself, fix path)",] + ) + def test_JPP_1150(self, Description): + nReturn = CExecute.Execute("JPP_1150") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file with cyclic imports (JSON file imports another file, that is already imported, fix path)",] + ) + def test_JPP_1151(self, Description): + nReturn = CExecute.Execute("JPP_1151") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file with not existing parameter within dynamic import path",] + ) + def test_JPP_1154(self, Description): + nReturn = CExecute.Execute("JPP_1154") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file with not existing import file",] + ) + def test_JPP_1155(self, Description): + nReturn = CExecute.Execute("JPP_1155") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file with error in [import] key (1)",] + ) + def test_JPP_1158(self, Description): + nReturn = CExecute.Execute("JPP_1158") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file with error in [import] key (2)",] + ) + def test_JPP_1159(self, Description): + nReturn = CExecute.Execute("JPP_1159") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file with error in imported file",] + ) + def test_JPP_1160(self, Description): + nReturn = CExecute.Execute("JPP_1160") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_15_PATH_FORMATS_GOODCASE.py b/test/pytest/pytestfiles/test_17_PATH_FORMATS_GOODCASE.py similarity index 96% rename from test/pytest/pytestfiles/test_15_PATH_FORMATS_GOODCASE.py rename to test/pytest/pytestfiles/test_17_PATH_FORMATS_GOODCASE.py index 7f72340e..c510b3a5 100644 --- a/test/pytest/pytestfiles/test_15_PATH_FORMATS_GOODCASE.py +++ b/test/pytest/pytestfiles/test_17_PATH_FORMATS_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_15_PATH_FORMATS_GOODCASE.py +# test_17_PATH_FORMATS_GOODCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 06.11.2024 - 18:29:18 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_16_BLOCKED_SLICING_BADCASE.py b/test/pytest/pytestfiles/test_18_BLOCKED_SLICING_BADCASE.py similarity index 99% rename from test/pytest/pytestfiles/test_16_BLOCKED_SLICING_BADCASE.py rename to test/pytest/pytestfiles/test_18_BLOCKED_SLICING_BADCASE.py index 15ea20ac..0e18b72c 100644 --- a/test/pytest/pytestfiles/test_16_BLOCKED_SLICING_BADCASE.py +++ b/test/pytest/pytestfiles/test_18_BLOCKED_SLICING_BADCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_16_BLOCKED_SLICING_BADCASE.py +# test_18_BLOCKED_SLICING_BADCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 06.11.2024 - 18:29:18 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_17_NESTED_LISTS_GOODCASE.py b/test/pytest/pytestfiles/test_19_NESTED_LISTS_GOODCASE.py similarity index 96% rename from test/pytest/pytestfiles/test_17_NESTED_LISTS_GOODCASE.py rename to test/pytest/pytestfiles/test_19_NESTED_LISTS_GOODCASE.py index a57ee943..d2737dc1 100644 --- a/test/pytest/pytestfiles/test_17_NESTED_LISTS_GOODCASE.py +++ b/test/pytest/pytestfiles/test_19_NESTED_LISTS_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_17_NESTED_LISTS_GOODCASE.py +# test_19_NESTED_LISTS_GOODCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 06.11.2024 - 18:29:18 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_18_STRING_INDICES_GOODCASE.py b/test/pytest/pytestfiles/test_20_STRING_INDICES_GOODCASE.py similarity index 97% rename from test/pytest/pytestfiles/test_18_STRING_INDICES_GOODCASE.py rename to test/pytest/pytestfiles/test_20_STRING_INDICES_GOODCASE.py index 337a3b86..3db7b353 100644 --- a/test/pytest/pytestfiles/test_18_STRING_INDICES_GOODCASE.py +++ b/test/pytest/pytestfiles/test_20_STRING_INDICES_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_18_STRING_INDICES_GOODCASE.py +# test_20_STRING_INDICES_GOODCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 06.11.2024 - 18:29:18 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_19_NOT_EXISTING_PARAMETERS_BADCASE.py b/test/pytest/pytestfiles/test_21_NOT_EXISTING_PARAMETERS_BADCASE.py similarity index 99% rename from test/pytest/pytestfiles/test_19_NOT_EXISTING_PARAMETERS_BADCASE.py rename to test/pytest/pytestfiles/test_21_NOT_EXISTING_PARAMETERS_BADCASE.py index eab1e72d..3e994c12 100644 --- a/test/pytest/pytestfiles/test_19_NOT_EXISTING_PARAMETERS_BADCASE.py +++ b/test/pytest/pytestfiles/test_21_NOT_EXISTING_PARAMETERS_BADCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_19_NOT_EXISTING_PARAMETERS_BADCASE.py +# test_21_NOT_EXISTING_PARAMETERS_BADCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 06.11.2024 - 18:29:18 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_20_LINE_BREAKS_GOODCASE.py b/test/pytest/pytestfiles/test_22_LINE_BREAKS_GOODCASE.py similarity index 96% rename from test/pytest/pytestfiles/test_20_LINE_BREAKS_GOODCASE.py rename to test/pytest/pytestfiles/test_22_LINE_BREAKS_GOODCASE.py index f70070e9..fcf90e0c 100644 --- a/test/pytest/pytestfiles/test_20_LINE_BREAKS_GOODCASE.py +++ b/test/pytest/pytestfiles/test_22_LINE_BREAKS_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_20_LINE_BREAKS_GOODCASE.py +# test_22_LINE_BREAKS_GOODCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 06.11.2024 - 18:29:18 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_21_SELF_ASSIGNMENTS_GOODCASE.py b/test/pytest/pytestfiles/test_23_SELF_ASSIGNMENTS_GOODCASE.py similarity index 96% rename from test/pytest/pytestfiles/test_21_SELF_ASSIGNMENTS_GOODCASE.py rename to test/pytest/pytestfiles/test_23_SELF_ASSIGNMENTS_GOODCASE.py index 9e9d73d5..c40a27d8 100644 --- a/test/pytest/pytestfiles/test_21_SELF_ASSIGNMENTS_GOODCASE.py +++ b/test/pytest/pytestfiles/test_23_SELF_ASSIGNMENTS_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_21_SELF_ASSIGNMENTS_GOODCASE.py +# test_23_SELF_ASSIGNMENTS_GOODCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 06.11.2024 - 18:29:18 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_22_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py b/test/pytest/pytestfiles/test_24_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py similarity index 96% rename from test/pytest/pytestfiles/test_22_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py rename to test/pytest/pytestfiles/test_24_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py index 8f5509fa..8efa0415 100644 --- a/test/pytest/pytestfiles/test_22_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py +++ b/test/pytest/pytestfiles/test_24_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_22_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py +# test_24_ASSIGNMENTS_BY_REFERENCE_GOODCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 06.11.2024 - 18:29:18 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_23_PARAMETER_SCOPE_GOODCASE.py b/test/pytest/pytestfiles/test_25_PARAMETER_SCOPE_GOODCASE.py similarity index 98% rename from test/pytest/pytestfiles/test_23_PARAMETER_SCOPE_GOODCASE.py rename to test/pytest/pytestfiles/test_25_PARAMETER_SCOPE_GOODCASE.py index 1ca0190e..7b7f0660 100644 --- a/test/pytest/pytestfiles/test_23_PARAMETER_SCOPE_GOODCASE.py +++ b/test/pytest/pytestfiles/test_25_PARAMETER_SCOPE_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_23_PARAMETER_SCOPE_GOODCASE.py +# test_25_PARAMETER_SCOPE_GOODCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 06.11.2024 - 18:29:18 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_24_PARAMETER_SCOPE_BADCASE.py b/test/pytest/pytestfiles/test_26_PARAMETER_SCOPE_BADCASE.py similarity index 70% rename from test/pytest/pytestfiles/test_24_PARAMETER_SCOPE_BADCASE.py rename to test/pytest/pytestfiles/test_26_PARAMETER_SCOPE_BADCASE.py index d4f8b4c0..4bcda173 100644 --- a/test/pytest/pytestfiles/test_24_PARAMETER_SCOPE_BADCASE.py +++ b/test/pytest/pytestfiles/test_26_PARAMETER_SCOPE_BADCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_24_PARAMETER_SCOPE_BADCASE.py +# test_26_PARAMETER_SCOPE_BADCASE.py # # XC-HWP/ESW3-Queckenstedt # -# 25.10.2024 - 20:31:28 +# 14.11.2024 - 15:38:04 # # -------------------------------------------------------------------------------------------------------------- @@ -30,67 +30,67 @@ class Test_PARAMETER_SCOPE_BADCASE: # -------------------------------------------------------------------------------------------------------------- - # Expected: JsonPreprocessor returns expected value + # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( "Description", ["JSON file containing a parameter with missing scope (1)",] ) - def test_JPP_2500(self, Description): - nReturn = CExecute.Execute("JPP_2500") + def test_JPP_2050(self, Description): + nReturn = CExecute.Execute("JPP_2050") assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- - # Expected: JsonPreprocessor returns expected value + # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( "Description", ["JSON file containing a parameter with missing scope (2)",] ) - def test_JPP_2501(self, Description): - nReturn = CExecute.Execute("JPP_2501") + def test_JPP_2051(self, Description): + nReturn = CExecute.Execute("JPP_2051") assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- - # Expected: JsonPreprocessor returns expected value + # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( "Description", ["JSON file containing a parameter with missing scope (3)",] ) - def test_JPP_2502(self, Description): - nReturn = CExecute.Execute("JPP_2502") + def test_JPP_2052(self, Description): + nReturn = CExecute.Execute("JPP_2052") assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- - # Expected: JsonPreprocessor returns expected value + # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( "Description", ["JSON file containing a parameter with missing scope (4)",] ) - def test_JPP_2503(self, Description): - nReturn = CExecute.Execute("JPP_2503") + def test_JPP_2053(self, Description): + nReturn = CExecute.Execute("JPP_2053") assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- - # Expected: JsonPreprocessor returns expected value + # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( "Description", ["JSON file containing a parameter with missing scope (5)",] ) - def test_JPP_2504(self, Description): - nReturn = CExecute.Execute("JPP_2504") + def test_JPP_2054(self, Description): + nReturn = CExecute.Execute("JPP_2054") assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- - # Expected: JsonPreprocessor returns expected value + # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( "Description", ["JSON file containing a parameter with missing scope (7)",] ) - def test_JPP_2506(self, Description): - nReturn = CExecute.Execute("JPP_2506") + def test_JPP_2056(self, Description): + nReturn = CExecute.Execute("JPP_2056") assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- - # Expected: JsonPreprocessor returns expected value + # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( "Description", ["JSON file containing a parameter with missing scope (8)",] ) - def test_JPP_2507(self, Description): - nReturn = CExecute.Execute("JPP_2507") + def test_JPP_2057(self, Description): + nReturn = CExecute.Execute("JPP_2057") assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- - # Expected: JsonPreprocessor returns expected value + # Expected: No values are returned, and JsonPreprocessor throws an exception @pytest.mark.parametrize( "Description", ["JSON file containing a parameter with missing scope (9)",] ) - def test_JPP_2508(self, Description): - nReturn = CExecute.Execute("JPP_2508") + def test_JPP_2058(self, Description): + nReturn = CExecute.Execute("JPP_2058") assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- diff --git a/test/testconfig/TestConfig.py b/test/testconfig/TestConfig.py index 59b655e2..e93bec79 100644 --- a/test/testconfig/TestConfig.py +++ b/test/testconfig/TestConfig.py @@ -22,7 +22,7 @@ # # -------------------------------------------------------------------------------------------------------------- # -# 25.10.2024 +# 14.11.2024 # # !!! Temporarily tests are deactivated by the following line commented out: # # # listofdictUsecases.append(dictUsecase) @@ -1707,6 +1707,260 @@ listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0401" +dictUsecase['DESCRIPTION'] = "JSON file with several parameter names containing: blank, backslash, 4Byte character" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0401.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +""" +# # # listofdictUsecases.append(dictUsecase) # several issues +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0450" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (1)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0450.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = """Invalid key name: "%A". Key names have to start with a letter, digit or underscore.""" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0451" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (2)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0451.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = """Invalid key name: "%A". Key names have to start with a letter, digit or underscore.""" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0452" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (3)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0452.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = """Invalid key name: "%A". Key names have to start with a letter, digit or underscore.""" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0453" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (4)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0453.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = """Invalid key name: "par%am".""" # error message to be extended +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0454" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (5)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0454.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = """Invalid key name: "par%am".""" # error message to be extended +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0455" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (6)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0455.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = """Invalid key name: "par%am".""" # error message to be extended +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0456" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (7)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0456.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # TODO +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # blanks inside name not allowed but currently accepted +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0457" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (8)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0457.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # TODO +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # blanks inside name not allowed but currently accepted +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0458" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (9)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0458.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # TODO +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # blanks inside name not allowed but currently accepted +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0459" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (10)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0459.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # TODO +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # empty name not allowed but currently accepted +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0460" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (11)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0460.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # TODO +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # empty name not allowed but currently accepted +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0461" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (12)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0461.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # TODO +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # empty name not allowed but currently accepted +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0462" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (13)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0462.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # TODO +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # name contains blanks only, waiting for final error message +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0463" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (14)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0463.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # TODO +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # name contains blanks only, waiting for final error message +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0464" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (15)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0464.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # TODO +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # name contains blanks only, waiting for final error message +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0465" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (16)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0465.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # TODO +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # invalid name accepted and usage causes: 'local variable 'tmpList03' referenced before assignment'! +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0466" +dictUsecase['DESCRIPTION'] = "JSON file with several invalid parameter names (17)" +dictUsecase['EXPECTATION'] = "All names are accepted (in definition and in reference)" +dictUsecase['SECTION'] = "NAMING_CONVENTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0466.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # TODO +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) # invalid name accepted and usage causes: 'local variable 'tmpList03' referenced before assignment'! +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- @@ -2552,13 +2806,258 @@ # -------------------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1100" +dictUsecase['DESCRIPTION'] = "JSON file import based on parameters (dynamic import (1))" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns values" +dictUsecase['SECTION'] = "FILE_IMPORTS" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1100.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (3/1) > {import_folder} [STR] : 'dynamic_imports' +[DOTDICT] (3/2) > {file_name} [STR] : 'imported.AA.jsonp' +[DOTDICT] (3/3) > {level} [STR] : 'AA' +""" +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1101" +dictUsecase['DESCRIPTION'] = "JSON file import based on parameters (dynamic import (2))" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns values" +dictUsecase['SECTION'] = "FILE_IMPORTS" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1101.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (3/1) > {dictDirs} [DOTDICT] (4/1) > {AA} [STR] : 'AA' +[DOTDICT] (3/1) > {dictDirs} [DOTDICT] (4/2) > {BB} [STR] : 'BB' +[DOTDICT] (3/1) > {dictDirs} [DOTDICT] (4/3) > {CC} [STR] : 'CC' +[DOTDICT] (3/1) > {dictDirs} [DOTDICT] (4/4) > {DD} [STR] : 'DD' +[DOTDICT] (3/2) > {listDirs} [LIST] (4/1) > [STR] : 'AA' +[DOTDICT] (3/2) > {listDirs} [LIST] (4/2) > [STR] : 'BB' +[DOTDICT] (3/2) > {listDirs} [LIST] (4/3) > [STR] : 'CC' +[DOTDICT] (3/2) > {listDirs} [LIST] (4/4) > [STR] : 'DD' +[DOTDICT] (3/3) > {level} [STR] : 'DD.1' +""" +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1102" +dictUsecase['DESCRIPTION'] = "JSON file import based on parameters (dynamic import (3))" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns values" +dictUsecase['SECTION'] = "FILE_IMPORTS" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1102.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (2/1) > {AA} [STR] : 'AA' +[DOTDICT] (2/2) > {level} [STR] : 'AA' +""" +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1103" # similar to JPP_1111, but with simple data types +dictUsecase['DESCRIPTION'] = "JSON file import based on parameters (dynamic import (4))" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns values" +dictUsecase['SECTION'] = "FILE_IMPORTS" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1103.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (8/1) > {dynamic_imports} [STR] : 'dynamic_imports' +[DOTDICT] (8/2) > {global_defs} [STR] : 'global_defs' +[DOTDICT] (8/3) > {level_up} [STR] : '../../../../' +[DOTDICT] (8/4) > {AA} [STR] : 'AA' +[DOTDICT] (8/5) > {BB} [STR] : 'BB' +[DOTDICT] (8/6) > {CC} [STR] : 'CC' +[DOTDICT] (8/7) > {DD} [STR] : 'DD' +[DOTDICT] (8/8) > {level} [STR] : 'DD.1' +""" +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1104" +dictUsecase['DESCRIPTION'] = "JSON file import based on parameters (dynamic import (5))" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns values" +dictUsecase['SECTION'] = "FILE_IMPORTS" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1104.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (4/1) > {cwd} [STR] : '.' +[DOTDICT] (4/2) > {path_sep_1} [STR] : '/' +[DOTDICT] (4/3) > {path_sep_2} [STR] : '\\' +[DOTDICT] (4/4) > {level} [STR] : 'AA' +""" +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1105" +dictUsecase['DESCRIPTION'] = "JSON file import based on parameters (dynamic import (6))" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns values" +dictUsecase['SECTION'] = "FILE_IMPORTS" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1105.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (6/1) > {P1} [STR] : './dynamic' +[DOTDICT] (6/2) > {P2} [STR] : '_import' +[DOTDICT] (6/3) > {P3} [STR] : 's/AA/imp' +[DOTDICT] (6/4) > {P4} [STR] : 'orted.A' +[DOTDICT] (6/5) > {P5} [STR] : 'A.jsonp' +[DOTDICT] (6/6) > {level} [STR] : 'AA' +""" +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1106" +dictUsecase['DESCRIPTION'] = "JSON file import based on parameters (dynamic import, recursive (7))" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns values" +dictUsecase['SECTION'] = "FILE_IMPORTS" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1106.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (6/1) > {AA} [STR] : 'AA' +[DOTDICT] (6/2) > {BB} [STR] : 'BB' +[DOTDICT] (6/3) > {CC} [STR] : 'CC' +[DOTDICT] (6/4) > {DD} [STR] : 'DD' +[DOTDICT] (6/5) > {level} [STR] : 'DD.2' +[DOTDICT] (6/6) > {origin} [STR] : 'DD.AA' +""" +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1107" +dictUsecase['DESCRIPTION'] = "JSON file import based on parameters (dynamic import, alternate (8))" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns values" +dictUsecase['SECTION'] = "FILE_IMPORTS" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = "The recursive import occurs alternately in a dynamic or fixed manner" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1107.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (5/1) > {AA} [STR] : 'AA' +[DOTDICT] (5/2) > {BB} [STR] : 'BB' +[DOTDICT] (5/3) > {CC} [STR] : 'CC' +[DOTDICT] (5/4) > {DD} [STR] : 'DD' +[DOTDICT] (5/5) > {level} [STR] : 'DD.3' +""" +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1108" +dictUsecase['DESCRIPTION'] = "JSON file import based on parameters (dynamic import, parallel (9))" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns values" +dictUsecase['SECTION'] = "FILE_IMPORTS" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = "The recursive import occurs in two import trees running in parallel with alternately in a dynamic or fixed manner" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1108.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (5/1) > {AA} [STR] : 'AA' +[DOTDICT] (5/2) > {BB} [STR] : 'BB' +[DOTDICT] (5/3) > {CC} [STR] : 'CC' +[DOTDICT] (5/4) > {DD} [STR] : 'DD' +[DOTDICT] (5/5) > {level} [STR] : 'DD.P.2.2.2' +""" +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1109" +dictUsecase['DESCRIPTION'] = "JSON file import based on dictionary key values" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns values" +dictUsecase['SECTION'] = "FILE_IMPORTS" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1109.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (2/1) > {import_files} [DOTDICT] (2/1) > {fileAA} [STR] : './dynamic_imports/AA/imported.AA.jsonp' +[DOTDICT] (2/1) > {import_files} [DOTDICT] (2/2) > {fileBB} [STR] : './dynamic_imports/AA/BB/imported.BB.jsonp' +[DOTDICT] (2/2) > {level} [STR] : 'BB' +""" +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1110" +dictUsecase['DESCRIPTION'] = "JSON file import based on list elemens" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns values" +dictUsecase['SECTION'] = "FILE_IMPORTS" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1110.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (2/1) > {import_files} [LIST] (2/1) > [STR] : './dynamic_imports/AA/imported.AA.jsonp' +[DOTDICT] (2/1) > {import_files} [LIST] (2/2) > [STR] : './dynamic_imports/AA/BB/imported.BB.jsonp' +[DOTDICT] (2/2) > {level} [STR] : 'BB'""" +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1111" # similar to JPP_1103, but with composite data types +dictUsecase['DESCRIPTION'] = "JSON file import based on parameters (dynamic import (7))" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns values" +dictUsecase['SECTION'] = "FILE_IMPORTS" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1111.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DOTDICT] (5/1) > {dynamic_imports} [STR] : 'dynamic_imports' +[DOTDICT] (5/2) > {global_defs} [STR] : 'global_defs' +[DOTDICT] (5/3) > {dictDirs} [DOTDICT] (4/1) > {AA} [STR] : 'AA' +[DOTDICT] (5/3) > {dictDirs} [DOTDICT] (4/2) > {BB} [STR] : 'BB' +[DOTDICT] (5/3) > {dictDirs} [DOTDICT] (4/3) > {CC} [STR] : 'CC' +[DOTDICT] (5/3) > {dictDirs} [DOTDICT] (4/4) > {DD} [STR] : 'DD' +[DOTDICT] (5/4) > {listDirs} [LIST] (4/1) > [STR] : 'AA' +[DOTDICT] (5/4) > {listDirs} [LIST] (4/2) > [STR] : 'BB' +[DOTDICT] (5/4) > {listDirs} [LIST] (4/3) > [STR] : 'CC' +[DOTDICT] (5/4) > {listDirs} [LIST] (4/4) > [STR] : 'DD' +[DOTDICT] (5/5) > {level} [STR] : 'BB' +""" +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} dictUsecase['TESTID'] = "JPP_1150" -dictUsecase['DESCRIPTION'] = "JSON file with cyclic imports (JSON file imports itself)" +dictUsecase['DESCRIPTION'] = "JSON file with cyclic imports (JSON file imports itself, fix path)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "CYCLIC_IMPORTS" +dictUsecase['SECTION'] = "FILE_IMPORTS" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None -dictUsecase['COMMENT'] = None +dictUsecase['COMMENT'] = "Cyclic import" dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1150.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = "Cyclic imported json file" dictUsecase['EXPECTEDRETURN'] = None @@ -2567,18 +3066,207 @@ # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_1151" -dictUsecase['DESCRIPTION'] = "JSON file with cyclic imports (JSON file imports another file, that is already imported)" +dictUsecase['DESCRIPTION'] = "JSON file with cyclic imports (JSON file imports another file, that is already imported, fix path)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" -dictUsecase['SECTION'] = "CYCLIC_IMPORTS" +dictUsecase['SECTION'] = "FILE_IMPORTS" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None -dictUsecase['COMMENT'] = None +dictUsecase['COMMENT'] = "Cyclic import" dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1151.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = "Cyclic imported json file" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1152" +dictUsecase['DESCRIPTION'] = "JSON file with cyclic imports (JSON file imports itself, dynamic path)" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "FILE_IMPORTS" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = "Cyclic import" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1152.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "Cyclic imported json file" # maximum recursion depth exceeded while calling a Python object +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1153" +dictUsecase['DESCRIPTION'] = "JSON file with cyclic imports (JSON file imports another file, that is already imported, dynamic path)" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "FILE_IMPORTS" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = "Cyclic import" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1153.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "Cyclic imported json file" # 'maximum recursion depth exceeded in __instancecheck__ +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1154" +dictUsecase['DESCRIPTION'] = "JSON file with not existing parameter within dynamic import path" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "FILE_IMPORTS" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1154.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "Could not load the import file './${I_AM_NOT_EXISTING}/imported.jsonp'. The parameter '${I_AM_NOT_EXISTING} ' is not available!'" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1155" +dictUsecase['DESCRIPTION'] = "JSON file with not existing import file" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "FILE_IMPORTS" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1155.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "is not existing!" # error message contains individual file path, therefore not part of this EXPECTEDEXCEPTION +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +# https://github.com/test-fullautomation/python-jsonpreprocessor/issues/377 +dictUsecase['TESTID'] = "JPP_1156" +dictUsecase['DESCRIPTION'] = "JSON file with syntax error in import path (1)" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "FILE_IMPORTS" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1156.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # currently: Could not load the import file './dynamic_imports/${AA/imported.AA.jsonp'. The parameter '' is not available! +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +# https://github.com/test-fullautomation/python-jsonpreprocessor/issues/381 +dictUsecase['TESTID'] = "JPP_1157" +dictUsecase['DESCRIPTION'] = "JSON file with syntax error in import path (2)" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "FILE_IMPORTS" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1157.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # currently: FREEZE; expected: bracket mismatch +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1158" +dictUsecase['DESCRIPTION'] = "JSON file with error in [import] key (1)" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "FILE_IMPORTS" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1158.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "Invalid key name: \"[import]__\". Key names have to start with a letter, digit or underscore." +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +# https://github.com/test-fullautomation/python-jsonpreprocessor/issues/358 +dictUsecase['TESTID'] = "JPP_1159" +dictUsecase['DESCRIPTION'] = "JSON file with error in [import] key (2)" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "FILE_IMPORTS" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1159.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "Invalid key name: \"__[import]\"" # remaining parts of the error message needs to be reworked and added here +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1160" +dictUsecase['DESCRIPTION'] = "JSON file with error in imported file" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "FILE_IMPORTS" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1160.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "Invalid syntax! One or more than one closed curly bracket is missing in expression" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +# https://github.com/test-fullautomation/python-jsonpreprocessor/issues/383 +dictUsecase['TESTID'] = "JPP_1161" +dictUsecase['DESCRIPTION'] = "JSON file with invalid data type of [import] key (1)" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "FILE_IMPORTS" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = "'int' instead of 'str'" +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1161.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # currently: argument of type 'int' is not iterable +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +# https://github.com/test-fullautomation/python-jsonpreprocessor/issues/383 +dictUsecase['TESTID'] = "JPP_1162" +dictUsecase['DESCRIPTION'] = "JSON file with invalid data type of [import] key (2)" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "FILE_IMPORTS" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = "'list' instead of 'str'" +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1162.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # currently: 'list' object has no attribute 'strip' +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +# https://github.com/test-fullautomation/python-jsonpreprocessor/issues/383 +dictUsecase['TESTID'] = "JPP_1163" +dictUsecase['DESCRIPTION'] = "JSON file with invalid data type of [import] key (3)" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "FILE_IMPORTS" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = "'dict' instead of 'str'" +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1163.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # currently: 'dict' object has no attribute 'strip' +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +# https://github.com/test-fullautomation/python-jsonpreprocessor/issues/383 +dictUsecase['TESTID'] = "JPP_1164" +dictUsecase['DESCRIPTION'] = "JSON file with invalid data type of [import] key (4)" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "FILE_IMPORTS" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = "'int' instead of 'str' (from 'dict')" +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1164.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None # currently: File '%values%['A']' is not existing! +dictUsecase['EXPECTEDRETURN'] = None +# # # listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_1200" @@ -2599,11 +3287,6 @@ listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- -# -------------------------------------------------------------------------------------------------------------- -# slicing shall be blocked -# https://github.com/test-fullautomation/python-jsonpreprocessor/issues/104 -# https://github.com/test-fullautomation/python-jsonpreprocessor/issues/205 -# -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_1350" dictUsecase['DESCRIPTION'] = "JSON file with blocked slicing notation (-1)" @@ -3434,127 +4117,128 @@ listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_2500" +dictUsecase['TESTID'] = "JPP_2050" dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (1)" -dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" dictUsecase['SECTION'] = "PARAMETER_SCOPE" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2500.jsonp" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2050.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = """'Could not resolve expression '${param}'. The based parameter 'param' is not defined yet! Use the ' : ' syntax to create a new based parameter.'""" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_2501" +dictUsecase['TESTID'] = "JPP_2051" dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (2)" -dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" dictUsecase['SECTION'] = "PARAMETER_SCOPE" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2501.jsonp" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2051.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = """'A key with name '${param}' does not exist at this position. Use the ' : ' syntax to create a new key.'""" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_2502" +dictUsecase['TESTID'] = "JPP_2052" dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (3)" -dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" dictUsecase['SECTION'] = "PARAMETER_SCOPE" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2502.jsonp" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2052.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = """'Missing scope for parameter '${param}'. To change the value of this parameter, an absolute path must be used: '${params}['001']['param']' or '${params.001.param}'.'""" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_2503" +dictUsecase['TESTID'] = "JPP_2053" dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (4)" -dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" dictUsecase['SECTION'] = "PARAMETER_SCOPE" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2503.jsonp" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2053.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = """'A key with name '${params}['001']' does not exist at this position. Use the ' : ' syntax to create a new key.'""" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_2504" +dictUsecase['TESTID'] = "JPP_2054" dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (5)" -dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" dictUsecase['SECTION'] = "PARAMETER_SCOPE" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2504.jsonp" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2054.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = """'A key with name '${params.001}' does not exist at this position. Use the ' : ' syntax to create a new key.'""" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_2505" +dictUsecase['TESTID'] = "JPP_2055" dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (6)" -dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" dictUsecase['SECTION'] = "PARAMETER_SCOPE" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2505.jsonp" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2055.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = None dictUsecase['EXPECTEDRETURN'] = None # # # listofdictUsecases.append(dictUsecase) # https://github.com/test-fullautomation/python-jsonpreprocessor/issues/349 del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_2506" +dictUsecase['TESTID'] = "JPP_2056" dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (7)" -dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" dictUsecase['SECTION'] = "PARAMETER_SCOPE" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2506.jsonp" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2056.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = """'A key with name '${C}' does not exist at this position. Use the ' : ' syntax to create a new key.'""" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_2507" +dictUsecase['TESTID'] = "JPP_2057" dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (8)" -dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" dictUsecase['SECTION'] = "PARAMETER_SCOPE" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2507.jsonp" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2057.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = """'A key with name '${params}[1]['B'][0]['C']' does not exist at this position. Use the ' : ' syntax to create a new key.'""" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} -dictUsecase['TESTID'] = "JPP_2508" +dictUsecase['TESTID'] = "JPP_2058" dictUsecase['DESCRIPTION'] = "JSON file containing a parameter with missing scope (9)" -dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" dictUsecase['SECTION'] = "PARAMETER_SCOPE" dictUsecase['SUBSECTION'] = "BADCASE" dictUsecase['HINT'] = None dictUsecase['COMMENT'] = None -dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2508.jsonp" +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_2058.jsonp" dictUsecase['EXPECTEDEXCEPTION'] = """'A key with name '${params.1.B.0.C}' does not exist at this position. Use the ' : ' syntax to create a new key.'""" dictUsecase['EXPECTEDRETURN'] = None listofdictUsecases.append(dictUsecase) diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.1.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.1.jsonp new file mode 100644 index 00000000..e40798c1 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.1.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "DD.1" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.2.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.2.jsonp new file mode 100644 index 00000000..b3bb9d15 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.2.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "DD.2" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.3.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.3.jsonp new file mode 100644 index 00000000..269d9236 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.3.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "DD.3" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.AA.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.AA.jsonp new file mode 100644 index 00000000..b6dc5c99 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.AA.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "origin" : "DD.AA" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.BB.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.BB.jsonp new file mode 100644 index 00000000..adb1f3c1 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.BB.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "origin" : "DD.BB" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.C.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.C.jsonp new file mode 100644 index 00000000..94a7e6f9 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.C.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "[import]" : "../../../imported.AA.C.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.CC.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.CC.jsonp new file mode 100644 index 00000000..03de8e30 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.CC.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "origin" : "DD.CC" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.P.1.1.1.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.P.1.1.1.jsonp new file mode 100644 index 00000000..af7ba951 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.P.1.1.1.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "DD.P.1.1.1" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.P.1.1.2.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.P.1.1.2.jsonp new file mode 100644 index 00000000..7b29954e --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.P.1.1.2.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "DD.P.1.1.2" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.P.1.2.1.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.P.1.2.1.jsonp new file mode 100644 index 00000000..41d0cfe3 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.P.1.2.1.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "DD.P.1.2.1" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.P.1.2.2.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.P.1.2.2.jsonp new file mode 100644 index 00000000..417f05ad --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.P.1.2.2.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "DD.P.1.2.2" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.P.2.1.1.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.P.2.1.1.jsonp new file mode 100644 index 00000000..9ca058f7 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.P.2.1.1.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "DD.P.2.1.1" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.P.2.1.2.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.P.2.1.2.jsonp new file mode 100644 index 00000000..0b4c2244 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.P.2.1.2.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "DD.P.2.1.2" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.P.2.2.1.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.P.2.2.1.jsonp new file mode 100644 index 00000000..f1288a91 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.P.2.2.1.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "DD.P.2.2.1" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.P.2.2.2.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.P.2.2.2.jsonp new file mode 100644 index 00000000..4e42e3ea --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/DD/imported.DD.P.2.2.2.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "DD.P.2.2.2" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.C.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.C.jsonp new file mode 100644 index 00000000..70cb3ca8 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.C.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "CC", + "[import]" : "./${DD}/imported.${DD}.C.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.M.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.M.jsonp new file mode 100644 index 00000000..4e6b8b55 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.M.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "CC", + "[import]" : "./DD/imported.DD.3.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.P.1.1.1.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.P.1.1.1.jsonp new file mode 100644 index 00000000..d86653dc --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.P.1.1.1.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "CC", + "[import]" : "./${DD}/imported.${DD}.P.1.1.1.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.P.1.1.2.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.P.1.1.2.jsonp new file mode 100644 index 00000000..686ef170 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.P.1.1.2.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "CC", + "[import]" : "./DD/imported.DD.P.1.1.2.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.P.1.2.1.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.P.1.2.1.jsonp new file mode 100644 index 00000000..631358ad --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.P.1.2.1.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "CC", + "[import]" : "./${DD}/imported.${DD}.P.1.2.1.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.P.1.2.2.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.P.1.2.2.jsonp new file mode 100644 index 00000000..0ded697c --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.P.1.2.2.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "CC", + "[import]" : "./DD/imported.DD.P.1.2.2.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.P.2.1.1.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.P.2.1.1.jsonp new file mode 100644 index 00000000..040de05d --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.P.2.1.1.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "CC", + "[import]" : "./${DD}/imported.${DD}.P.2.1.1.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.P.2.1.2.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.P.2.1.2.jsonp new file mode 100644 index 00000000..d9807160 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.P.2.1.2.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "CC", + "[import]" : "./DD/imported.DD.P.2.1.2.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.P.2.2.1.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.P.2.2.1.jsonp new file mode 100644 index 00000000..68323a58 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.P.2.2.1.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "CC", + "[import]" : "./${DD}/imported.${DD}.P.2.2.1.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.P.2.2.2.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.P.2.2.2.jsonp new file mode 100644 index 00000000..8b425ad8 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.P.2.2.2.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "CC", + "[import]" : "./DD/imported.DD.P.2.2.2.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.R.D.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.R.D.jsonp new file mode 100644 index 00000000..4c3cadf9 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.R.D.jsonp @@ -0,0 +1,19 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "CC", + "[import]" : "./${DD}/imported.${DD}.2.jsonp", + "[import]" : "./DD/imported.DD.CC.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.R.F.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.R.F.jsonp new file mode 100644 index 00000000..51c85a10 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.R.F.jsonp @@ -0,0 +1,19 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "CC", + "[import]" : "./DD/imported.DD.1.jsonp", + "[import]" : "./DD/imported.DD.CC.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.jsonp b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.jsonp new file mode 100644 index 00000000..7e335b9d --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/CC/imported.CC.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "CC" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/imported.BB.C.jsonp b/test/testfiles/dynamic_imports/AA/BB/imported.BB.C.jsonp new file mode 100644 index 00000000..23f50563 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/imported.BB.C.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "BB", + "[import]" : "./${CC}/imported.${CC}.C.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/imported.BB.M.jsonp b/test/testfiles/dynamic_imports/AA/BB/imported.BB.M.jsonp new file mode 100644 index 00000000..83715ada --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/imported.BB.M.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "BB", + "[import]" : "./${CC}/imported.${CC}.M.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/imported.BB.P.1.1.jsonp b/test/testfiles/dynamic_imports/AA/BB/imported.BB.P.1.1.jsonp new file mode 100644 index 00000000..c2541555 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/imported.BB.P.1.1.jsonp @@ -0,0 +1,19 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "BB", + "[import]" : "./CC/imported.CC.P.1.1.1.jsonp", + "[import]" : "./${CC}/imported.${CC}.P.1.1.2.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/imported.BB.P.1.2.jsonp b/test/testfiles/dynamic_imports/AA/BB/imported.BB.P.1.2.jsonp new file mode 100644 index 00000000..3bbfa04f --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/imported.BB.P.1.2.jsonp @@ -0,0 +1,19 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "BB", + "[import]" : "./${CC}/imported.${CC}.P.1.2.1.jsonp", + "[import]" : "./CC/imported.CC.P.1.2.2.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/imported.BB.P.2.1.jsonp b/test/testfiles/dynamic_imports/AA/BB/imported.BB.P.2.1.jsonp new file mode 100644 index 00000000..1e260df8 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/imported.BB.P.2.1.jsonp @@ -0,0 +1,19 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "BB", + "[import]" : "./${CC}/imported.${CC}.P.2.1.1.jsonp", + "[import]" : "./CC/imported.CC.P.2.1.2.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/imported.BB.P.2.2.jsonp b/test/testfiles/dynamic_imports/AA/BB/imported.BB.P.2.2.jsonp new file mode 100644 index 00000000..ccad20d7 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/imported.BB.P.2.2.jsonp @@ -0,0 +1,19 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "BB", + "[import]" : "./CC/imported.CC.P.2.2.1.jsonp", + "[import]" : "./${CC}/imported.${CC}.P.2.2.2.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/imported.BB.R.D.jsonp b/test/testfiles/dynamic_imports/AA/BB/imported.BB.R.D.jsonp new file mode 100644 index 00000000..be74862a --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/imported.BB.R.D.jsonp @@ -0,0 +1,19 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "BB", + "[import]" : "./${CC}/imported.${CC}.R.D.jsonp", + "[import]" : "./CC/DD/imported.DD.BB.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/imported.BB.R.F.jsonp b/test/testfiles/dynamic_imports/AA/BB/imported.BB.R.F.jsonp new file mode 100644 index 00000000..94c82a59 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/imported.BB.R.F.jsonp @@ -0,0 +1,19 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "BB", + "[import]" : "./CC/imported.CC.R.F.jsonp", + "[import]" : "./CC/DD/imported.DD.BB.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/BB/imported.BB.jsonp b/test/testfiles/dynamic_imports/AA/BB/imported.BB.jsonp new file mode 100644 index 00000000..17aa5331 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/BB/imported.BB.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "BB" +} diff --git a/test/testfiles/dynamic_imports/AA/imported.AA.C.jsonp b/test/testfiles/dynamic_imports/AA/imported.AA.C.jsonp new file mode 100644 index 00000000..5414b6c5 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/imported.AA.C.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "AA", + "[import]" : "./${BB}/imported.${BB}.C.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/imported.AA.M.jsonp b/test/testfiles/dynamic_imports/AA/imported.AA.M.jsonp new file mode 100644 index 00000000..5b612165 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/imported.AA.M.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "AA", + "[import]" : "./BB/imported.BB.M.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/imported.AA.P.1.jsonp b/test/testfiles/dynamic_imports/AA/imported.AA.P.1.jsonp new file mode 100644 index 00000000..182a1612 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/imported.AA.P.1.jsonp @@ -0,0 +1,24 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "AA", + // + "BB" : "BB", + "CC" : "CC", + "DD" : "DD", + // + "[import]" : "./${BB}/imported.${BB}.P.1.1.jsonp", + "[import]" : "./BB/imported.BB.P.1.2.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/imported.AA.P.2.jsonp b/test/testfiles/dynamic_imports/AA/imported.AA.P.2.jsonp new file mode 100644 index 00000000..18906518 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/imported.AA.P.2.jsonp @@ -0,0 +1,24 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "AA", + // + "BB" : "BB", + "CC" : "CC", + "DD" : "DD", + // + "[import]" : "./BB/imported.BB.P.2.1.jsonp", + "[import]" : "./${BB}/imported.${BB}.P.2.2.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/imported.AA.R.D.jsonp b/test/testfiles/dynamic_imports/AA/imported.AA.R.D.jsonp new file mode 100644 index 00000000..3755214c --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/imported.AA.R.D.jsonp @@ -0,0 +1,19 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "AA", + "[import]" : "./${BB}/imported.${BB}.R.D.jsonp", + "[import]" : "./BB/CC/DD/imported.DD.AA.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/imported.AA.R.F.jsonp b/test/testfiles/dynamic_imports/AA/imported.AA.R.F.jsonp new file mode 100644 index 00000000..335da120 --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/imported.AA.R.F.jsonp @@ -0,0 +1,19 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "AA", + "[import]" : "./BB/imported.BB.R.F.jsonp", + "[import]" : "./BB/CC/DD/imported.DD.AA.jsonp" +} diff --git a/test/testfiles/dynamic_imports/AA/imported.AA.jsonp b/test/testfiles/dynamic_imports/AA/imported.AA.jsonp new file mode 100644 index 00000000..b658961a --- /dev/null +++ b/test/testfiles/dynamic_imports/AA/imported.AA.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "AA" +} diff --git a/test/testfiles/dynamic_imports/cyclic_import.jsonp b/test/testfiles/dynamic_imports/cyclic_import.jsonp new file mode 100644 index 00000000..719af97d --- /dev/null +++ b/test/testfiles/dynamic_imports/cyclic_import.jsonp @@ -0,0 +1,21 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "AA" : "AA", + "BB" : "BB", + "CC" : "CC", + "DD" : "DD", + "[import]" : "./${AA}/imported.${AA}.C.jsonp" +} diff --git a/test/testfiles/dynamic_imports/cyclic_import_itself.jsonp b/test/testfiles/dynamic_imports/cyclic_import_itself.jsonp new file mode 100644 index 00000000..3698c743 --- /dev/null +++ b/test/testfiles/dynamic_imports/cyclic_import_itself.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "root_name" : "cyclic_import", + "[import]" : "./${root_name}_itself.jsonp" +} diff --git a/test/testfiles/dynamic_imports/dynamic_import.R.D.jsonp b/test/testfiles/dynamic_imports/dynamic_import.R.D.jsonp new file mode 100644 index 00000000..3f428d93 --- /dev/null +++ b/test/testfiles/dynamic_imports/dynamic_import.R.D.jsonp @@ -0,0 +1,19 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "[import]" : "./global_defs/global_defs_1.jsonp", + "level" : "dynamic_imports", + "[import]" : "./${AA}/imported.${AA}.R.D.jsonp" +} diff --git a/test/testfiles/dynamic_imports/dynamic_import.R.F.jsonp b/test/testfiles/dynamic_imports/dynamic_import.R.F.jsonp new file mode 100644 index 00000000..dc241921 --- /dev/null +++ b/test/testfiles/dynamic_imports/dynamic_import.R.F.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "dynamic_imports", + "[import]" : "./AA/imported.AA.R.F.jsonp" +} diff --git a/test/testfiles/dynamic_imports/dynamic_import.jsonp b/test/testfiles/dynamic_imports/dynamic_import.jsonp new file mode 100644 index 00000000..4b9aea10 --- /dev/null +++ b/test/testfiles/dynamic_imports/dynamic_import.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "level" : "dynamic_imports" +} diff --git a/test/testfiles/dynamic_imports/global_defs/global_defs_1.jsonp b/test/testfiles/dynamic_imports/global_defs/global_defs_1.jsonp new file mode 100644 index 00000000..77b4ba00 --- /dev/null +++ b/test/testfiles/dynamic_imports/global_defs/global_defs_1.jsonp @@ -0,0 +1,20 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "AA" : "AA", + "BB" : "BB", + "CC" : "CC", + "DD" : "DD" +} diff --git a/test/testfiles/dynamic_imports/global_defs/global_defs_2.jsonp b/test/testfiles/dynamic_imports/global_defs/global_defs_2.jsonp new file mode 100644 index 00000000..5f67a83d --- /dev/null +++ b/test/testfiles/dynamic_imports/global_defs/global_defs_2.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "dictDirs" : {"AA" : "AA", "BB" : "BB", "CC" : "CC", "DD" : "DD"}, + "listDirs" : ["AA", "BB","CC","DD"] +} diff --git a/test/testfiles/dynamic_imports/import_err_1.jsonp b/test/testfiles/dynamic_imports/import_err_1.jsonp new file mode 100644 index 00000000..84471eee --- /dev/null +++ b/test/testfiles/dynamic_imports/import_err_1.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "AA" : "AA", + "[import]" : "./${AA}/imported.${${AA}.jsonp" +} diff --git a/test/testfiles/dynamic_imports/mixed_import.jsonp b/test/testfiles/dynamic_imports/mixed_import.jsonp new file mode 100644 index 00000000..01d0d89c --- /dev/null +++ b/test/testfiles/dynamic_imports/mixed_import.jsonp @@ -0,0 +1,21 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "AA" : "AA", + "BB" : "BB", + "CC" : "CC", + "DD" : "DD", + "[import]" : "./${AA}/imported.${AA}.M.jsonp" +} diff --git a/test/testfiles/dynamic_imports/parallel_import.jsonp b/test/testfiles/dynamic_imports/parallel_import.jsonp new file mode 100644 index 00000000..fedd0ef3 --- /dev/null +++ b/test/testfiles/dynamic_imports/parallel_import.jsonp @@ -0,0 +1,19 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "AA" : "AA", + "[import]" : "./${AA}/imported.${AA}.P.1.jsonp", + "[import]" : "./${AA}/imported.${AA}.P.2.jsonp" +} diff --git a/test/testfiles/jpp-test_config_0401.jsonp b/test/testfiles/jpp-test_config_0401.jsonp new file mode 100644 index 00000000..bdd29d2d --- /dev/null +++ b/test/testfiles/jpp-test_config_0401.jsonp @@ -0,0 +1,54 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + // -- blank, backslash, 4Byte character + " param " : 1, + "p21" : ${param}, + // + "B" : {" param " : 1}, + "p22" : ${B}['param'], + // + "C" : [1, {" param " : 1}, 2], + "p23" : ${C}[1]['param'], + // + "par\\am" : 1, + "p24" : ${par\\am}, + // + "D" : {"par\\am" : 1}, + "p25" : ${D}['par\\am'], + // + "E" : [1, {"par\\am" : 1}, 2], + "p26" : ${E}[1]['par\\am'], + // + "path\\to\\file" : "C:\\Users\\Example\\file.txt" + // + "par𠼭am" : 1, + "p27" : ${par𠼭am}, + // + "F" : {"par𠼭am" : 1}, + "p28" : ${F}['par𠼭am'], + // + "G" : [1, {"par𠼭am" : 1}, 2], + "p29" : ${G}[1]['par𠼭am'], + // + "𠼭param" : 1, + "p30" : ${𠼭param}, + // + "H" : {"𠼭param" : 1}, + "p31" : ${H}['𠼭param'], + // + "K" : [1, {"𠼭param" : 1}, 2], + "p32" : ${K}[1]['𠼭param'], +} diff --git a/test/testfiles/jpp-test_config_0450.jsonp b/test/testfiles/jpp-test_config_0450.jsonp new file mode 100644 index 00000000..37d70f04 --- /dev/null +++ b/test/testfiles/jpp-test_config_0450.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "%A" : 1, + "p01" : ${%A} +} diff --git a/test/testfiles/jpp-test_config_0451.jsonp b/test/testfiles/jpp-test_config_0451.jsonp new file mode 100644 index 00000000..85767bb5 --- /dev/null +++ b/test/testfiles/jpp-test_config_0451.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "B" : {"%A" : 1}, + "p02" : ${B}['%A'] +} diff --git a/test/testfiles/jpp-test_config_0452.jsonp b/test/testfiles/jpp-test_config_0452.jsonp new file mode 100644 index 00000000..20d89afb --- /dev/null +++ b/test/testfiles/jpp-test_config_0452.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "C" : [1, {"%A" : 1}, 2], + "p03" : ${C}[1]['%A'] +} diff --git a/test/testfiles/jpp-test_config_0453.jsonp b/test/testfiles/jpp-test_config_0453.jsonp new file mode 100644 index 00000000..241ee64b --- /dev/null +++ b/test/testfiles/jpp-test_config_0453.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "par%am" : 1, + "p04" : ${par%am} +} diff --git a/test/testfiles/jpp-test_config_0454.jsonp b/test/testfiles/jpp-test_config_0454.jsonp new file mode 100644 index 00000000..10c0c39f --- /dev/null +++ b/test/testfiles/jpp-test_config_0454.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "D" : {"par%am" : 1}, + "p05" : ${D}['par%am'] +} diff --git a/test/testfiles/jpp-test_config_0455.jsonp b/test/testfiles/jpp-test_config_0455.jsonp new file mode 100644 index 00000000..e7fa3774 --- /dev/null +++ b/test/testfiles/jpp-test_config_0455.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "E" : [1, {"par%am" : 1}, 2], + "p06" : ${E}[1]['par%am'] +} diff --git a/test/testfiles/jpp-test_config_0456.jsonp b/test/testfiles/jpp-test_config_0456.jsonp new file mode 100644 index 00000000..153d2f9e --- /dev/null +++ b/test/testfiles/jpp-test_config_0456.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "par am" : 1, + "p04" : ${par am} +} diff --git a/test/testfiles/jpp-test_config_0457.jsonp b/test/testfiles/jpp-test_config_0457.jsonp new file mode 100644 index 00000000..9b607b56 --- /dev/null +++ b/test/testfiles/jpp-test_config_0457.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "F" : {"par am" : 1}, + "p05" : ${F}['par am'] +} diff --git a/test/testfiles/jpp-test_config_0458.jsonp b/test/testfiles/jpp-test_config_0458.jsonp new file mode 100644 index 00000000..74413ee6 --- /dev/null +++ b/test/testfiles/jpp-test_config_0458.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "G" : [1, {"par am" : 1}, 2], + "p06" : ${G}[1]['par am'] +} diff --git a/test/testfiles/jpp-test_config_0459.jsonp b/test/testfiles/jpp-test_config_0459.jsonp new file mode 100644 index 00000000..d4b69c6e --- /dev/null +++ b/test/testfiles/jpp-test_config_0459.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "" : 1 +} diff --git a/test/testfiles/jpp-test_config_0460.jsonp b/test/testfiles/jpp-test_config_0460.jsonp new file mode 100644 index 00000000..8196a871 --- /dev/null +++ b/test/testfiles/jpp-test_config_0460.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "B" : {"" : 1} +} diff --git a/test/testfiles/jpp-test_config_0461.jsonp b/test/testfiles/jpp-test_config_0461.jsonp new file mode 100644 index 00000000..3aad0d87 --- /dev/null +++ b/test/testfiles/jpp-test_config_0461.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "C" : [1, {"" : 1}, 2] +} diff --git a/test/testfiles/jpp-test_config_0462.jsonp b/test/testfiles/jpp-test_config_0462.jsonp new file mode 100644 index 00000000..1a9f2d68 --- /dev/null +++ b/test/testfiles/jpp-test_config_0462.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + " " : 1 +} diff --git a/test/testfiles/jpp-test_config_0463.jsonp b/test/testfiles/jpp-test_config_0463.jsonp new file mode 100644 index 00000000..fc26b989 --- /dev/null +++ b/test/testfiles/jpp-test_config_0463.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "B" : {" " : 1} +} diff --git a/test/testfiles/jpp-test_config_0464.jsonp b/test/testfiles/jpp-test_config_0464.jsonp new file mode 100644 index 00000000..155566fa --- /dev/null +++ b/test/testfiles/jpp-test_config_0464.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "C" : [1, {" " : 1}, 2] +} diff --git a/test/testfiles/jpp-test_config_0465.jsonp b/test/testfiles/jpp-test_config_0465.jsonp new file mode 100644 index 00000000..36a1bc93 --- /dev/null +++ b/test/testfiles/jpp-test_config_0465.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "$A:" : 1, + "p01" : ${$A:} +} diff --git a/test/testfiles/jpp-test_config_0466.jsonp b/test/testfiles/jpp-test_config_0466.jsonp new file mode 100644 index 00000000..98292803 --- /dev/null +++ b/test/testfiles/jpp-test_config_0466.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + ":::" : 1, + "p01" : ${:::} +} diff --git a/test/testfiles/jpp-test_config_1100.jsonp b/test/testfiles/jpp-test_config_1100.jsonp new file mode 100644 index 00000000..326b6bf2 --- /dev/null +++ b/test/testfiles/jpp-test_config_1100.jsonp @@ -0,0 +1,19 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "import_folder" : "dynamic_imports", + "file_name" : "imported.AA.jsonp", + "[import]" : "./${import_folder}/AA/${file_name}" +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_1101.jsonp b/test/testfiles/jpp-test_config_1101.jsonp new file mode 100644 index 00000000..b3966bd9 --- /dev/null +++ b/test/testfiles/jpp-test_config_1101.jsonp @@ -0,0 +1,19 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "dictDirs" : {"AA" : "AA", "BB" : "BB", "CC" : "CC", "DD" : "DD"}, + "listDirs" : ["AA", "BB", "CC", "DD"], + "[import]" : "./dynamic_imports/${dictDirs}['AA']/${listDirs}[1]/${dictDirs.CC}/${listDirs.3}/imported.${listDirs.3}.1.jsonp" +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_1102.jsonp b/test/testfiles/jpp-test_config_1102.jsonp new file mode 100644 index 00000000..aa04d085 --- /dev/null +++ b/test/testfiles/jpp-test_config_1102.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "AA" : "AA", + "[import]" : "./dynamic_imports/${${${AA}}}/imported.${${${AA}}}.jsonp" +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_1103.jsonp b/test/testfiles/jpp-test_config_1103.jsonp new file mode 100644 index 00000000..976f0452 --- /dev/null +++ b/test/testfiles/jpp-test_config_1103.jsonp @@ -0,0 +1,21 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "dynamic_imports" : "dynamic_imports", + "global_defs" : "global_defs", + "level_up" : "../../../../", + "[import]" : "./${dynamic_imports}/${global_defs}/${global_defs}_1.jsonp", + "[import]" : "./${dynamic_imports}/${AA}/${BB}/${CC}/${DD}/${level_up}${AA}/${BB}/${CC}/${DD}/imported.DD.1.jsonp" +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_1104.jsonp b/test/testfiles/jpp-test_config_1104.jsonp new file mode 100644 index 00000000..1d94b2e8 --- /dev/null +++ b/test/testfiles/jpp-test_config_1104.jsonp @@ -0,0 +1,20 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "cwd" : ".", + "path_sep_1" : "/", + "path_sep_2" : "\\", + "[import]" : "${cwd}${path_sep_1}dynamic_imports${path_sep_2}AA${path_sep_1}imported.AA.jsonp" +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_1105.jsonp b/test/testfiles/jpp-test_config_1105.jsonp new file mode 100644 index 00000000..f59d3044 --- /dev/null +++ b/test/testfiles/jpp-test_config_1105.jsonp @@ -0,0 +1,22 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "P1" : "./dynamic", + "P2" : "_import", + "P3" : "s/AA/imp", + "P4" : "orted.A", + "P5" : "A.jsonp", + "[import]" : "${P1}${P2}${P3}${P4}${P5}" +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_1106.jsonp b/test/testfiles/jpp-test_config_1106.jsonp new file mode 100644 index 00000000..c7357643 --- /dev/null +++ b/test/testfiles/jpp-test_config_1106.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "[import]" : "./dynamic_imports/dynamic_import.R.D.jsonp" +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_1107.jsonp b/test/testfiles/jpp-test_config_1107.jsonp new file mode 100644 index 00000000..fc5c9ff4 --- /dev/null +++ b/test/testfiles/jpp-test_config_1107.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "[import]" : "./dynamic_imports/mixed_import.jsonp" +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_1108.jsonp b/test/testfiles/jpp-test_config_1108.jsonp new file mode 100644 index 00000000..432a187a --- /dev/null +++ b/test/testfiles/jpp-test_config_1108.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "[import]" : "./dynamic_imports/parallel_import.jsonp" +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_1109.jsonp b/test/testfiles/jpp-test_config_1109.jsonp new file mode 100644 index 00000000..5e03eb7b --- /dev/null +++ b/test/testfiles/jpp-test_config_1109.jsonp @@ -0,0 +1,22 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "import_files" : { + "fileAA" : "./dynamic_imports/AA/imported.AA.jsonp", + "fileBB" : "./dynamic_imports/AA/BB/imported.BB.jsonp" + }, + "[import]" : ${import_files}['fileAA'], + "[import]" : "${import_files}['fileBB']" +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_1110.jsonp b/test/testfiles/jpp-test_config_1110.jsonp new file mode 100644 index 00000000..c3528761 --- /dev/null +++ b/test/testfiles/jpp-test_config_1110.jsonp @@ -0,0 +1,22 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "import_files" : [ + "./dynamic_imports/AA/imported.AA.jsonp", + "./dynamic_imports/AA/BB/imported.BB.jsonp" + ], + "[import]" : ${import_files}[0], + "[import]" : "${import_files}[1]" +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_1111.jsonp b/test/testfiles/jpp-test_config_1111.jsonp new file mode 100644 index 00000000..57023108 --- /dev/null +++ b/test/testfiles/jpp-test_config_1111.jsonp @@ -0,0 +1,20 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "dynamic_imports" : "dynamic_imports", + "global_defs" : "global_defs", + "[import]" : "./${dynamic_imports}/${global_defs}/${global_defs}_2.jsonp", + "[import]" : "./${dynamic_imports}/${dictDirs.AA}/${listDirs.1}/imported.BB.jsonp" +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_1152.jsonp b/test/testfiles/jpp-test_config_1152.jsonp new file mode 100644 index 00000000..904cfe42 --- /dev/null +++ b/test/testfiles/jpp-test_config_1152.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "imports_dir" : "dynamic_imports", + "[import]" : "./${imports_dir}/cyclic_import_itself.jsonp" +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_1153.jsonp b/test/testfiles/jpp-test_config_1153.jsonp new file mode 100644 index 00000000..09f4ee44 --- /dev/null +++ b/test/testfiles/jpp-test_config_1153.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "imports_dir" : "dynamic_imports", + "[import]" : "./${imports_dir}/cyclic_import.jsonp" +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_1154.jsonp b/test/testfiles/jpp-test_config_1154.jsonp new file mode 100644 index 00000000..a8e1a17f --- /dev/null +++ b/test/testfiles/jpp-test_config_1154.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "[import]" : "./${I_AM_NOT_EXISTING}/imported.jsonp" +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_1155.jsonp b/test/testfiles/jpp-test_config_1155.jsonp new file mode 100644 index 00000000..f214cf3c --- /dev/null +++ b/test/testfiles/jpp-test_config_1155.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "[import]" : "./I_AM_NOT_EXISTING/I_AM_NOT_EXISTING.jsonp" +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_1156.jsonp b/test/testfiles/jpp-test_config_1156.jsonp new file mode 100644 index 00000000..316da9f2 --- /dev/null +++ b/test/testfiles/jpp-test_config_1156.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "AA" : "AA", + "[import]" : "./dynamic_imports/${AA/imported.AA.jsonp" +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_1157.jsonp b/test/testfiles/jpp-test_config_1157.jsonp new file mode 100644 index 00000000..6ef7c58f --- /dev/null +++ b/test/testfiles/jpp-test_config_1157.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "AA" : "AA", + "[import]" : "./dynamic_imports/${${AA/imported.AA.jsonp" +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_1158.jsonp b/test/testfiles/jpp-test_config_1158.jsonp new file mode 100644 index 00000000..2665387f --- /dev/null +++ b/test/testfiles/jpp-test_config_1158.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "AA" : "AA", + "[import]__" : "./dynamic_imports/${AA}/imported.${AA}.jsonp" +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_1159.jsonp b/test/testfiles/jpp-test_config_1159.jsonp new file mode 100644 index 00000000..d3c30994 --- /dev/null +++ b/test/testfiles/jpp-test_config_1159.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "AA" : "AA", + "__[import]" : "./dynamic_imports/${AA}/imported.${AA}.jsonp" +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_1160.jsonp b/test/testfiles/jpp-test_config_1160.jsonp new file mode 100644 index 00000000..4c497631 --- /dev/null +++ b/test/testfiles/jpp-test_config_1160.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "AA" : "AA", + "[import]" : "./dynamic_imports/import_err_1.jsonp" +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_1161.jsonp b/test/testfiles/jpp-test_config_1161.jsonp new file mode 100644 index 00000000..00120d8e --- /dev/null +++ b/test/testfiles/jpp-test_config_1161.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "[import]" : 123 +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_1162.jsonp b/test/testfiles/jpp-test_config_1162.jsonp new file mode 100644 index 00000000..79145651 --- /dev/null +++ b/test/testfiles/jpp-test_config_1162.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "[import]" : [1,2,3] +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_1163.jsonp b/test/testfiles/jpp-test_config_1163.jsonp new file mode 100644 index 00000000..c288b147 --- /dev/null +++ b/test/testfiles/jpp-test_config_1163.jsonp @@ -0,0 +1,17 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "[import]" : {"A" : 1, "B" : 2} +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_1164.jsonp b/test/testfiles/jpp-test_config_1164.jsonp new file mode 100644 index 00000000..bf0c14e8 --- /dev/null +++ b/test/testfiles/jpp-test_config_1164.jsonp @@ -0,0 +1,18 @@ +// Copyright 2020-2024 Robert Bosch GmbH +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +//************************************************************************** +{ + "values" : {"A" : 1, "B" : 2}, + "[import]" : ${values}['A'] +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_2500.jsonp b/test/testfiles/jpp-test_config_2050.jsonp similarity index 100% rename from test/testfiles/jpp-test_config_2500.jsonp rename to test/testfiles/jpp-test_config_2050.jsonp diff --git a/test/testfiles/jpp-test_config_2501.jsonp b/test/testfiles/jpp-test_config_2051.jsonp similarity index 100% rename from test/testfiles/jpp-test_config_2501.jsonp rename to test/testfiles/jpp-test_config_2051.jsonp diff --git a/test/testfiles/jpp-test_config_2502.jsonp b/test/testfiles/jpp-test_config_2052.jsonp similarity index 100% rename from test/testfiles/jpp-test_config_2502.jsonp rename to test/testfiles/jpp-test_config_2052.jsonp diff --git a/test/testfiles/jpp-test_config_2503.jsonp b/test/testfiles/jpp-test_config_2053.jsonp similarity index 100% rename from test/testfiles/jpp-test_config_2503.jsonp rename to test/testfiles/jpp-test_config_2053.jsonp diff --git a/test/testfiles/jpp-test_config_2504.jsonp b/test/testfiles/jpp-test_config_2054.jsonp similarity index 100% rename from test/testfiles/jpp-test_config_2504.jsonp rename to test/testfiles/jpp-test_config_2054.jsonp diff --git a/test/testfiles/jpp-test_config_2505.jsonp b/test/testfiles/jpp-test_config_2055.jsonp similarity index 100% rename from test/testfiles/jpp-test_config_2505.jsonp rename to test/testfiles/jpp-test_config_2055.jsonp diff --git a/test/testfiles/jpp-test_config_2506.jsonp b/test/testfiles/jpp-test_config_2056.jsonp similarity index 100% rename from test/testfiles/jpp-test_config_2506.jsonp rename to test/testfiles/jpp-test_config_2056.jsonp diff --git a/test/testfiles/jpp-test_config_2507.jsonp b/test/testfiles/jpp-test_config_2057.jsonp similarity index 100% rename from test/testfiles/jpp-test_config_2507.jsonp rename to test/testfiles/jpp-test_config_2057.jsonp diff --git a/test/testfiles/jpp-test_config_2508.jsonp b/test/testfiles/jpp-test_config_2058.jsonp similarity index 100% rename from test/testfiles/jpp-test_config_2508.jsonp rename to test/testfiles/jpp-test_config_2058.jsonp diff --git a/test/testtools/GenSnippetsJPP.py b/test/testtools/GenSnippetsJPP.py index 5cad1131..8d573576 100644 --- a/test/testtools/GenSnippetsJPP.py +++ b/test/testtools/GenSnippetsJPP.py @@ -22,8 +22,8 @@ # # ************************************************************************************************************** # -VERSION = "0.28.0" -VERSION_DATE = "18.04.2024" +VERSION = "0.32.0" +VERSION_DATE = "07.11.2024" # # ************************************************************************************************************** @@ -105,7 +105,7 @@ def __init__(self, sCalledBy=None): THISAPP = CString.NormalizePath(sCalledBy) self.__dictConfig['THISAPP'] = THISAPP self.__dictConfig['THISAPPNAME'] = os.path.basename(THISAPP) - REFERENCEPATH = os.path.dirname(THISAPP) # position of main() app is reference for all relative paths + REFERENCEPATH = os.path.dirname(THISAPP) # position of main() app is reference for all relative paths in this script self.__dictConfig['REFERENCEPATH'] = REFERENCEPATH self.__dictConfig['TMPFILESPATH'] = f"{REFERENCEPATH}/tmp_files" self.__dictConfig['OUTPUTPATH'] = f"{REFERENCEPATH}" # /output @@ -121,6 +121,21 @@ def __init__(self, sCalledBy=None): self.__dictConfig['PYTHONVERSION'] = sys.version self.__dictConfig['NOW'] = time.strftime('%d.%m.%Y - %H:%M:%S') + # JSONP snippets may contain the '[import]' key. For relative import paths we need to define a reference folder. + # We predefine three possible positions for reference folders that will be checked for existence. The first hit will be used. + JSONSNIPPET_REFERENCEPATH = None + listImportRootPaths = [REFERENCEPATH, f"{REFERENCEPATH}/..", f"{REFERENCEPATH}/../testfiles"] + importFolder = "dynamic_imports" # the subfolder containing all imported JSONP files + for sImportRootPath in listImportRootPaths: + sImportRootPath = CString.NormalizePath(sImportRootPath) + sImportPath = f"{sImportRootPath}/{importFolder}" + # print(f"checking additional import file path '{sImportFolder}'") + if os.path.isdir(sImportPath): + JSONSNIPPET_REFERENCEPATH = sImportRootPath + break + if JSONSNIPPET_REFERENCEPATH is not None: + self.__dictConfig['JSONSNIPPET_REFERENCEPATH'] = JSONSNIPPET_REFERENCEPATH + # -------------------------------------------------------------------------------------------------------------- #TM*** @@ -432,8 +447,15 @@ def __ExecuteJPPSnippets(self, sHeadline="UNKNOWN", listCodeSnippets=[]): oJPPJSONFILE.Write(f"// created at {NOW}") oJPPJSONFILE.Write(sCodeSnippet) del oJPPJSONFILE - # execute temporary JSON file - dictReturned, sException, bSuccess, sResult = self.__ExecuteJPPFile(JPPJSONFILE) + + # -------------------------------------------------------------------------------------------------------------- + # === (alternative 1) execute temporary JSON file + # dictReturned, sException, bSuccess, sResult = self.__ExecuteJPPFile(JPPJSONFILE) + # + # === (alternative 2) execute temporary JSON string + dictReturned, sException, bSuccess, sResult = self.__ExecuteJPPString(sCodeSnippet, self.__oConfig.Get('JSONSNIPPET_REFERENCEPATH')) + # -------------------------------------------------------------------------------------------------------------- + # PrettyPrint(bSuccess, sPrefix="(bSuccess)") # PrettyPrint(sResult, sPrefix="(sResult)") # PrettyPrint(dictReturned, sPrefix="(dictReturned)") @@ -509,6 +531,42 @@ def __ExecuteJPPFile(self, sJSONFile=None): # eof def __ExecuteJPPFile(self, sJSONFile=None): + def __ExecuteJPPString(self, sJSONString=None, referenceDir=""): + + sMethod = "__ExecuteJPPString" + + bSuccess = None + sResult = "UNKNOWN" + dictReturned = None + sException = None + + if sJSONString is None: + sResult = CString.FormatResult(sMethod, None, "sJSONString is None") + return dictReturned, sException, bSuccess, sResult + + # use either own or common JsonPreprocessor object + oJsonPreprocessor = None + if self.__oJsonPreprocessor is None: + oJsonPreprocessor = CJsonPreprocessor() + else: + oJsonPreprocessor = self.__oJsonPreprocessor + + # execute JsonPreprocessor + dictReturned = None + sException = None + try: + dictReturned = oJsonPreprocessor.jsonLoads(sJSONString, referenceDir) + except Exception as reason: + sException = f"'{reason}'" + + del oJsonPreprocessor + + bSuccess = True + sResult = "done" + return dictReturned, sException, bSuccess, sResult + + # eof def __ExecuteJPPString(self, sJSONFile=None): + # -------------------------------------------------------------------------------------------------------------- # eof class CExecutor(): @@ -1759,7 +1817,7 @@ def GetSeveralParticularSnippets(self): "param01" : ${stringParam}[${index}], "param02" : "${stringParam}[${index}]", // - "param03" : ${indexList}[${indexList}[${index}]], // returns STR instead of INT + "param03" : ${indexList}[${indexList}[${index}]], "param04" : "${indexList}[${indexList}[${index}]]", // "param05" : ${stringParam}[${indexList}[${indexList}[${index}]]], @@ -2348,249 +2406,1255 @@ def GetSeveralParticularSnippets(self): } """) +# -------------------------------------------------------------------------------------------------------------- +# 28.10.2024 +# code snippets taken from latest issues - # listCodeSnippets.append("""{ -# } -# """) + listCodeSnippets.append("""{ + "keyP" : "A", + "newparam" : ${keyP}[${keyP}] +} +""") - return sHeadline, listCodeSnippets + listCodeSnippets.append("""{ + "dictP" : {"A" : 1, "B" : 2}, + "newparam" : ${dictP}['${dictP}'] +} +""") - # eof def GetSeveralParticularSnippets(self): + listCodeSnippets.append("""{ + "dictP1" : {"A" : 1 , "B" : 2}, + "dictP2" : {"1" : "C", "2" : "D"}, + "newparam" : ${dictP2}['${dictP1}['A']'] +} +""") - # -------------------------------------------------------------------------------------------------------------- + listCodeSnippets.append("""{ + "newparam" : ${listP}['${listP}'] +} +""") - def GetBracketMismatch(self): - """Assignments with missing brackets - """ + listCodeSnippets.append("""{ + "indexP" : 0, + "newparam" : ${indexP}[${indexP}] +} +""") - sHeadline = "Assignments with missing brackets" + listCodeSnippets.append("""{ + "listparam" : ["A","B","C"], + ${{listparam}[0] : "value"} +} +""") - listCodeSnippets = [] + listCodeSnippets.append("""{ + "listparam1" : ["A", "B"], + "listparam2" : [1, 2], + ${listparam1}[${listparam2}] : 3 +} +""") listCodeSnippets.append("""{ - "param1" : "value1", - "param2" : ${param1} + "listparam1" : ["A", "B"], + "listparam2" : [1, 2], + "param" : ${listparam1}[${listparam2}] } """) listCodeSnippets.append("""{ - "param1" : "value1", - "param2" : ${param1 + "params" : {"A" : []} } """) listCodeSnippets.append("""{ - "param1" : "value1", - "param2" : "${param1" + "params" : {"A" : ["B", []]} } """) listCodeSnippets.append("""{ - "param1" : "value1", - "param2" : param1" + "listparam" : ["A", "B"], + "newparam" : ${listparam}[20] } """) listCodeSnippets.append("""{ - "param1" : "value1", - "param2" : "param1}" + "dictparam" : {"A" : 1, "B" : 2}, + "newparam" : ${dictparam}['AB'] } """) listCodeSnippets.append("""{ - "listparam" : ["A","B","C"], - "param" : ${listparam[0] + "strParam" : "ABC", + "param1" : [1, {"001" : "${strParam}"}, 2], + "param2" : ${param1}[1]['001'] +} +""") + +# -------------------------------------------------------------------------------------------------------------- + +# -- NAMING_CONVENTION + + # 0400 + listCodeSnippets.append("""{ + "A" : 1, + "check01" : ${A}, + // Bug: https://github.com/test-fullautomation/python-jsonpreprocessor/issues/357#issuecomment-2435677836 + // 'The parameter '${0}' is not available!'! + "0" : 2, + "check02" : ${0}, + "_" : 3, + "check03" : ${_}, + // + "Ax" : 4, + "check04" : ${Ax}, + "0x" : 5, + "check05" : ${0x}, + "_x" : 6, + "check06" : ${_x}, + // + "param+1" : 7, + "check07" : ${param+1}, + "param-2" : 8, + "check08" : ${param-2}, + "param*3" : 9, + "check09" : ${param*3}, + "param/4" : 10, + // bug: https://github.com/test-fullautomation/python-jsonpreprocessor/issues/356#issuecomment-2435708593 + // Expecting ',' delimiter + "check10" : ${param/4}, + // + "p01" : {"A" : 7}, + "check11" : ${p01}['A'], + "p02" : {"0" : 8}, + "check12" : ${p02}['0'], + "p03" : {"_" : 9}, + "check13" : ${p03}['_'], + // + "p04" : {"Ax" : 10}, + "check14" : ${p04}['Ax'], + "p05" : {"0x" : 11}, + "check15" : ${p05}['0x'], + "p06" : {"_x" : 12}, + "check16" : ${p06}['_x'], + // + "p07" : {"param+1" : 13}, + "check17" : ${p07}['param+1'], + "p08" : {"param-2" : 14}, + "check18" : ${p08}['param-2'], + "p09" : {"param*3" : 15}, + "check19" : ${p09}['param*3'], + "p10" : {"param/4" : 16}, + // Expecting ',' delimiter + "check20" : ${p10}['param/4'], + // + "p11" : [1, {"A" : 17}, 2], + "check21" : ${p11}[1]['A'], + "p12" : [1, {"0" : 18}, 2], + "check22" : ${p12}[1]['0'], + "p13" : [1, {"_" : 19}, 2], + "check23" : ${p13}[1]['_'], + // + "p14" : [1, {"Ax" : 20}, 2], + "check24" : ${p14}[1]['Ax'], + "p15" : [1, {"0x" : 21}, 2], + "check25" : ${p15}[1]['0x'], + "p16" : [1, {"_x" : 22}, 2], + "check26" : ${p16}[1]['_x'], + // + "p17" : [1, {"param+1" : 23}, 2], + "check27" : ${p17}[1]['param+1'], + "p18" : [1, {"param-2" : 24}, 2], + "check28" : ${p18}[1]['param-2'], + "p19" : [1, {"param*3" : 25}, 2], + "check29" : ${p19}[1]['param*3'], + "p20" : [1, {"param/4" : 26}, 2] + // Expecting ',' delimiter + "check30" : ${p20}[1]['param/4'] } """) + # -- blank, backslash, chinese character + listCodeSnippets.append("""{ - "listparam" : ["A","B","C"], - "param" : "${listparam[0]" + " param " : 1, + "p21" : ${param} } """) listCodeSnippets.append("""{ - "listparam" : ["A","B","C"], - "param" : ${listparam}0] + "B" : {" param " : 1}, + "p22" : ${B}['param'] } """) listCodeSnippets.append("""{ - "listparam" : ["A","B","C"], - "param" : "${listparam}0]" + "C" : [1, {" param " : 1}, 2], + "p23" : ${C}[1]['param'] } """) listCodeSnippets.append("""{ - "listparam" : ["A","B","C"], - "param" : ${listparam}[0 + "par\\am" : 1, + "p24" : ${par\\am} } """) listCodeSnippets.append("""{ - "listparam" : ["A","B","C"], - "param" : "${listparam}[0" + "D" : {"par\\am" : 1}, + "p25" : ${D}['par\\am'] } """) listCodeSnippets.append("""{ - "listparam" : ["A","B","C"], - "param" : ${${listparam}[0] + "E" : [1, {"par\\am" : 1}, 2], + "p26" : ${E}[1]['par\\am'] } """) listCodeSnippets.append("""{ - "listparam" : ["A","B","C"], - "param" : "${${listparam}[0]" + "path_to_file" : "C:\\Users\\Example\\file.txt" } """) listCodeSnippets.append("""{ - "listparam" : ["A","B","C"], - "param" : $}${listparam}[0] + "path\\to\\file" : "root_path" } """) listCodeSnippets.append("""{ - "listparam" : ["A","B","C"], - "param" : "$}${listparam}[0]" + "path\\to\\file" : "C:\\Users\\Example\\file.txt" } """) listCodeSnippets.append("""{ - "listparam" : ["A","B","C"], - ${listparam}[0] : "value" + "par𠼭am" : 1, + "p27" : ${par𠼭am} } """) listCodeSnippets.append("""{ - "listparam" : ["A","B","C"], - ${listparam[0] : "value" + "F" : {"par𠼭am" : 1}, + "p28" : ${F}['par𠼭am'] } """) listCodeSnippets.append("""{ - "listparam" : ["A","B","C"], - ${listparam}0] : "value" + "G" : [1, {"par𠼭am" : 1}, 2], + "p29" : ${G}[1]['par𠼭am'] } """) listCodeSnippets.append("""{ - "listparam" : ["A","B","C"], - ${{listparam}[0] : "value" + "𠼭param" : 1, + "p30" : ${𠼭param} } """) listCodeSnippets.append("""{ - "listparam" : ["A","B","C"], - ${listparam}[}0] : "value" + "H" : {"𠼭param" : 1}, + "p31" : ${H}['𠼭param'] } """) - return sHeadline, listCodeSnippets + listCodeSnippets.append("""{ + "K" : [1, {"𠼭param" : 1}, 2], + "p32" : ${K}[1]['𠼭param'] +} +""") - # eof def GetBracketMismatch(self): - # -------------------------------------------------------------------------------------------------------------- + listCodeSnippets.append("""{ + "%A" : 1, + "p01" : ${%A} +} +""") - def GetDatatypePermutations(self): - """Data type permutations in a fix pattern. Parameter types: int, str, list, dict. - """ + listCodeSnippets.append("""{ + "B" : {"%A" : 1}, + "p02" : ${B}['%A'] +} +""") - sHeadline = "Data type permutations in a fix pattern. Parameter types: int, str, list, dict." + listCodeSnippets.append("""{ + "C" : [1, {"%A" : 1}, 2], + "p03" : ${C}[1]['%A'] +} +""") - sDefinitions = """ "indexP" : 0, - "keyP" : "A", - "dictP" : {"A" : 1, "B" : 2}, - "listP" : ["A", "B"], -""" + listCodeSnippets.append("""{ + "par%am" : 1, + "p04" : ${par%am} +} +""") - sCodeSnippetPattern = """{ -####DEFINITIONS#### -####ASSIGNMENT#### + listCodeSnippets.append("""{ + "D" : {"par%am" : 1}, + "p05" : ${D}['par%am'] } -""" +""") - listofDataTypeTuples = [] - listofDataTypeTuples.append(("indexP", "indexP")) - listofDataTypeTuples.append(("indexP", "keyP")) - listofDataTypeTuples.append(("indexP", "dictP")) - listofDataTypeTuples.append(("indexP", "listP")) - listofDataTypeTuples.append(("keyP", "indexP")) - listofDataTypeTuples.append(("keyP", "keyP")) - listofDataTypeTuples.append(("keyP", "dictP")) - listofDataTypeTuples.append(("keyP", "listP")) - listofDataTypeTuples.append(("dictP", "indexP")) - listofDataTypeTuples.append(("dictP", "keyP")) - listofDataTypeTuples.append(("dictP", "dictP")) - listofDataTypeTuples.append(("dictP", "listP")) - listofDataTypeTuples.append(("listP", "indexP")) - listofDataTypeTuples.append(("listP", "keyP")) - listofDataTypeTuples.append(("listP", "dictP")) - listofDataTypeTuples.append(("listP", "listP")) + listCodeSnippets.append("""{ + "E" : [1, {"par%am" : 1}, 2], + "p06" : ${E}[1]['par%am'] +} +""") - listAssignments = [] + listCodeSnippets.append("""{ + "par am" : 1, + "p04" : ${par am} +} +""") - listAssignments.append(" \"newparam\" : ${XXXX}[${YYYY}]") - listAssignments.append(" \"newparam\" : \"${XXXX}[${YYYY}]\"") - listAssignments.append(" \"newparam\" : ${XXXX}['${YYYY}']") - listAssignments.append(" \"newparam\" : \"${XXXX}['${YYYY}']\"") + listCodeSnippets.append("""{ + "F" : {"par am" : 1}, + "p05" : ${F}['par am'] +} +""") - listAssignments.append(" \"newparam\" : ${XXXX[${YYYY}]}") - listAssignments.append(" \"newparam\" : \"${XXXX[${YYYY}]}\"") - listAssignments.append(" \"newparam\" : ${XXXX['${YYYY}']}") - listAssignments.append(" \"newparam\" : \"${XXXX['${YYYY}']}\"") + listCodeSnippets.append("""{ + "G" : [1, {"par am" : 1}, 2], + "p06" : ${G}[1]['par am'] +} +""") - listAssignments.append(" \"newparam\" : ${XXXX[${YYYY}]}") - listAssignments.append(" \"newparam\" : \"${XXXX[${YYYY}]}\"") - listAssignments.append(" \"newparam\" : ${XXXX['${YYYY}']}") - listAssignments.append(" \"newparam\" : \"${XXXX['${YYYY}']}\"") + listCodeSnippets.append("""{ + "" : 1 +} +""") - listAssignments.append(" \"newparam\" : ${XXXX.${YYYY}}") - listAssignments.append(" \"newparam\" : \"${XXXX.${YYYY}}\"") + listCodeSnippets.append("""{ + "B" : {"" : 1} +} +""") - listAssignments.append(" ${XXXX}[${YYYY}] : \"newvalue\"") - listAssignments.append(" \"${XXXX}[${YYYY}]\" : \"newvalue\"") - listAssignments.append(" ${XXXX}['${YYYY}'] : \"newvalue\"") - listAssignments.append(" \"${XXXX}['${YYYY}']\" : \"newvalue\"") + listCodeSnippets.append("""{ + "C" : [1, {"" : 1}, 2] +} +""") - listAssignments.append(" ${XXXX[${YYYY}]} : \"newvalue\"") - listAssignments.append(" \"${XXXX[${YYYY}]}\" : \"newvalue\"") - listAssignments.append(" ${XXXX['${YYYY}']} : \"newvalue\"") - listAssignments.append(" \"${XXXX['${YYYY}']}\" : \"newvalue\"") + listCodeSnippets.append("""{ + " " : 1 +} +""") - listAssignments.append(" ${XXXX[${YYYY}]} : \"newvalue\"") - listAssignments.append(" \"${XXXX[${YYYY}]}\" : \"newvalue\"") - listAssignments.append(" ${XXXX['${YYYY}']} : \"newvalue\"") - listAssignments.append(" \"${XXXX['${YYYY}']}\" : \"newvalue\"") + listCodeSnippets.append("""{ + "B" : {" " : 1} +} +""") - listAssignments.append(" ${XXXX.${YYYY}} : \"newvalue\"") - listAssignments.append(" \"${XXXX.${YYYY}}\" : \"newvalue\"") + listCodeSnippets.append("""{ + "C" : [1, {" " : 1}, 2] +} +""") - # put all things together + listCodeSnippets.append("""{ + "$A:" : 1, + "p01" : ${$A:} +} +""") - listCodeSnippets = [] + listCodeSnippets.append("""{ + ":::" : 1, + "p01" : ${:::} +} +""") - for sAssignment in listAssignments: - for tupleDataTypes in listofDataTypeTuples: - sAssignment_repl = sAssignment.replace("XXXX", tupleDataTypes[0]) - sAssignment_repl = sAssignment_repl.replace("YYYY", tupleDataTypes[1]) - sCodeSnippet = sCodeSnippetPattern.replace("####DEFINITIONS####", sDefinitions) - sCodeSnippet = sCodeSnippet.replace("####ASSIGNMENT####", sAssignment_repl) - listCodeSnippets.append(sCodeSnippet) + # listCodeSnippets.append("""{ +# } +# """) - return sHeadline, listCodeSnippets +# -------------------------------------------------------------------------------------------------------------- - # eof def GetDatatypePermutations(self): +# - parameter scope - # -------------------------------------------------------------------------------------------------------------- + listCodeSnippets.append("""{ + "param" : 1, + "params" : {"001" : { + "param" : 2, + ${params}['001']['param'] : 3 + } + } +} +""") - def GetNestedDataTypes(self): - """Combinations of several expressions within a data structure of multiple nested dictionaries and lists - """ + listCodeSnippets.append("""{ + "param" : 1, + "params" : {"001" : { + "param" : 2, + ${params.001.param} : 3 + } + } +} +""") - sHeadline = "Combinations of several expressions within a data structure of multiple nested dictionaries and lists" + listCodeSnippets.append("""{ + "param" : 1, + "params" : {"001" : { + "param" : 2 + } + }, + ${params}['001']['param'] : 3 +} +""") + + listCodeSnippets.append("""{ + "param" : 1, + "params" : {"001" : { + "param" : 2 + } + }, + ${params.001.param} : 3 +} +""") + + listCodeSnippets.append("""{ + // https://github.com/test-fullautomation/python-jsonpreprocessor/issues/349 + "C" : 1, + "params" : [ + 2, + {"A" : 3, + "B" : [ + { + "C" : 4, + ${params}[1]['B'][0]['C'] : 10, + "D" : 5 + }, + 6 + ] + }, + 7 + ] +} +""") + + listCodeSnippets.append("""{ + // https://github.com/test-fullautomation/python-jsonpreprocessor/issues/349 + // 'A key with name '${params.1.B.0.C}' does not exist at this position. Use the ' : ' syntax to create a new key.'! + + "C" : 1, + "params" : [ + 2, + {"A" : 3, + "B" : [ + { + "C" : 4, + ${params.1.B.0.C} : 10, + "D" : 5 + }, + 6 + ] + }, + 7 + ] +} +""") + + listCodeSnippets.append("""{ + // https://github.com/test-fullautomation/python-jsonpreprocessor/issues/349 + // {C} [INT] : 10 + + "C" : 1, + "params" : [ + 2, + {"A" : 3, + "B" : [ + { + "C" : 4, + "D" : 5 + }, + 6 + ] + }, + 7 + ], + ${params}[1]['B'][0]['C'] : 10 +} +""") + + listCodeSnippets.append("""{ + "C" : 1, + "params" : [ + 2, + {"A" : 3, + "B" : [ + { + "C" : 4, + "D" : 5 + }, + 6 + ] + }, + 7 + ], + ${params.1.B.0.C} : 10 +} +""") + + listCodeSnippets.append("""{ + ${param} : 1 +} +""") + + listCodeSnippets.append("""{ + "param" : 1, + "params" : {"001" : { + ${param} : 2 + } + } +} +""") + + listCodeSnippets.append("""{ + "param" : 1, + "params" : {"001" : { + "param" : 2, + ${param} : 3 + } + } +} +""") + + listCodeSnippets.append("""{ + "params" : {"001" : { + ${params}['001'] : 1 + } + } +} +""") + + listCodeSnippets.append("""{ + "params" : {"001" : { + ${params.001} : 1 + } + } +} +""") + + listCodeSnippets.append("""{ + // https://github.com/test-fullautomation/python-jsonpreprocessor/issues/349 + // invalid output + "C" : 1, + "params" : [ + 2, + {"A" : 3, + "B" : [ + { + "C" : 4, + ${C} : 10, + "D" : 5 + }, + 6 + ] + }, + 7 + ] +} +""") + + listCodeSnippets.append("""{ + "C" : 1, + "params" : [ + 2, + {"A" : 3, + "B" : [ + { + ${C} : 10, + "D" : 5 + }, + 6 + ] + }, + 7 + ] +} +""") + + listCodeSnippets.append("""{ + "C" : 1, + "params" : [ + 2, + {"A" : 3, + "B" : [ + { + ${params}[1]['B'][0]['C'] : 10, + "D" : 5 + }, + 6 + ] + }, + 7 + ] +} +""") + + listCodeSnippets.append("""{ + "C" : 1, + "params" : [ + 2, + {"A" : 3, + "B" : [ + { + ${params.1.B.0.C} : 10, + "D" : 5 + }, + 6 + ] + }, + 7 + ] +} +""") + +# -------------------------------------------------------------------------------------------------------------- + +# -- BLOCKED_DATA_TYPES + + listCodeSnippets.append("""{ + "testlist" : [1,2,3], + "param" : "${testlist}" +} +""") + + listCodeSnippets.append("""{ + "testlist" : [1,2,3], + "param" : "A_${testlist}_B" +} +""") + + listCodeSnippets.append("""{ + "testdict" : {"A" : 1, "B" : 2}, + "param" : "${testdict}" +} +""") + + listCodeSnippets.append("""{ + "testdict" : {"A" : 1, "B" : 2}, + "param" : "A_${testdict}_B" +} +""") + + listCodeSnippets.append("""{ + "testlist" : [1,2,3], + "testdict" : {"A" : 1, "B" : 2}, + "param" : "A_${testlist}_${testdict}_B" +} +""") + + listCodeSnippets.append("""{ + "testdict" : {"A" : 1, "B" : 2}, + "param" : [1,"${testdict}",3] +} +""") + + listCodeSnippets.append("""{ + "testlist" : [1,2,3], + "param" : {"A" : 1, "B" : "${testlist}"} +} +""") + + listCodeSnippets.append("""{ + "testlist" : [1,2,3], + "param" : {"A" : [{"A" : 1, "B" : 2}, {"C" : 3, "D" : [1,2,"${testlist}",3]}], "E" : 5} +} +""") + + listCodeSnippets.append("""{ + "testdict" : {"A" : 1, "B" : 2}, + "param" : {"A" : [{"A" : 1, "B" : 2}, {"C" : 3, "D" : [1,2,"${testdict}",3]}], "E" : 5} +} +""") + + # -- blocked dynamic key names + + listCodeSnippets.append("""{ + "param1" : "A", + "${param1}" : "B" +} +""") + + listCodeSnippets.append("""{ + "param1" : "A", + "A.${param1}.B" : "B" +} +""") + + listCodeSnippets.append("""{ + "testlist" : [1,2,3], + "${testlist}" : "B" +} +""") + + listCodeSnippets.append("""{ + "testdict" : {"A" : 1, "B" : 2}, + "A.${testdict}.B" : "B" +} +""") + + listCodeSnippets.append("""{ + "param1" : "A", + "param1" : {"A" : 1, "${param1}" : 2} +} +""") + + listCodeSnippets.append("""{ + "param1" : "A", + "param1" : {"A" : 1, "A.${param1}.B" : 2} +} +""") + + listCodeSnippets.append("""{ + "testlist" : [1,2,3], + "param1" : {"A" : 1, "${testlist}" : 2} +} +""") + + listCodeSnippets.append("""{ + "testdict" : {"A" : 1, "B" : 2}, + "param1" : {"A" : 1, "A.${testdict}.B" : 2} +} +""") + + listCodeSnippets.append("""{ + "param" : "X", + "testdict" : {"A" : 1, "B" : 2}, + ${testdict}['${param}'] : 3 +} +""") + + listCodeSnippets.append("""{ + "testdict" : {"A" : 1, "B" : 2, "X" : 3}, + "param" : "X", + ${testdict}['${param}'] : 4 +} +""") + + listCodeSnippets.append("""{ + "param" : "X", + "testdict" : {"A" : 1, "B" : 2}, + ${testdict}[${param}] : 3 +} +""") + + listCodeSnippets.append("""{ + "testdict" : {"A" : 1, "B" : 2, "X" : 3}, + "param" : "X", + ${testdict}[${param}] : 4 +} +""") + + listCodeSnippets.append("""{ + "param" : "X", + "testdict" : {"A" : 1, "B" : 2}, + ${testdict.${param}} : 3 +} +""") + + listCodeSnippets.append("""{ + "testdict" : {"A" : 1, "B" : 2, "X" : 3}, + "param" : "X", + ${testdict.${param}} : 4 +} +""") + +# -------------------------------------------------------------------------------------------------------------- + + listCodeSnippets.append("""{ + // implicit creation in ascending dotdict syntax: + ${testdict1.subKey1} : {"subKey2" : {"subKey3" : {"subKey4" : 1}}}, + ${testdict1.subKey1.subKey2} : {"subKey3" : {"subKey4" : 2}}, + ${testdict1.subKey1.subKey2.subKey3} : {"subKey4" : 3}, + ${testdict1.subKey1.subKey2.subKey3.subKey4} : 4, + // + // implicit creation in descending dotdict syntax: + ${testdict2.subKey1.subKey2.subKey3.subKey4} : 5, + ${testdict2.subKey1.subKey2.subKey3} : {"subKey4" : 6}, + ${testdict2.subKey1.subKey2} : {"subKey3" : {"subKey4" : 7}}, + ${testdict2.subKey1} : {"subKey2" : {"subKey3" : {"subKey4" : 8}}}, + // + // cross check: + "testdict3" : {"subKey1" : {"subKey2" : {"subKey3" : {"subKey4" : 30}}}}, + "testdict4" : {"subKey1" : {"subKey2" : {"subKey3" : {"subKey4" : 40}}}} +} +""") + +# -------------------------------------------------------------------------------------------------------------- + + # -- some special cases + + listCodeSnippets.append("""{ + "params" : {"001" : {"param" : 1}}, + ${params.001.param} : 2 +} +""") + + listCodeSnippets.append("""{ + ${params}['001']['param1'] : 1, + ${params.1.param2} : 2, + ${params.a001.param3} : 3 +} +""") + + listCodeSnippets.append("""{ + ${params.001.param} : 2 +} +""") + + listCodeSnippets.append("""{ + "param1" : "A", + "testdict" : {"A" : 1, "B" : 2}, + ${testdict}["${param1}"] : 3 +} +""") + + listCodeSnippets.append("""{ + "A" : [1, 2], + "A" : [3, 4] +} +""") + + listCodeSnippets.append("""{ + "B" : {"param1" : 1}, + "B" : {"param2" : 1} +} +""") + + listCodeSnippets.append("""{ + // within key names slicing doesn't make sense + "A" : {"$B:" : 1}, + "p02" : ${A}['$B:'] +} +""") + + listCodeSnippets.append("""{ + "index" : 1, + "listvalues" : [1, 2, 3], + "param" : ${listvalues}[+${index}] +} +""") + + # -------------------------------------------------------------------------------------------------------------- + + # -- dynamic imports + + listCodeSnippets.append("""{ + "import_folder" : "dynamic_imports", + "file_name" : "imported.AA.jsonp", + "[import]" : "./${import_folder}/AA/${file_name}" +} +""") + + listCodeSnippets.append("""{ + "dictDirs" : {"AA" : "AA", "BB" : "BB", "CC" : "CC", "DD" : "DD"}, + "listDirs" : ["AA", "BB", "CC", "DD"], + "[import]" : "./dynamic_imports/${dictDirs}['AA']/${listDirs}[1]/${dictDirs.CC}/${listDirs.3}/imported.${listDirs.3}.1.jsonp" +} +""") + + listCodeSnippets.append("""{ + "AA" : "AA", + "[import]" : "./dynamic_imports/${${${AA}}}/imported.${${${AA}}}.jsonp" +} +""") + + listCodeSnippets.append("""{ + "[import]" : "./dynamic_imports/global_defs/global_defs_1.jsonp", + "level_up" : "../../../../", + "[import]" : "./dynamic_imports/${AA}/${BB}/${CC}/${DD}/${level_up}${AA}/${BB}/${CC}/${DD}/imported.DD.1.jsonp" +} +""") + + listCodeSnippets.append("""{ + "dynamic_imports" : "dynamic_imports", + "global_defs" : "global_defs", + "level_up" : "../../../../", + "[import]" : "./${dynamic_imports}/${global_defs}/${global_defs}_1.jsonp", + "[import]" : "./${dynamic_imports}/${AA}/${BB}/${CC}/${DD}/${level_up}${AA}/${BB}/${CC}/${DD}/imported.DD.1.jsonp" +} +""") + + listCodeSnippets.append("""{ + "cwd" : ".", + "path_sep_1" : "/", + "path_sep_2" : "\\", + "[import]" : "${cwd}${path_sep_1}dynamic_imports${path_sep_2}AA${path_sep_1}imported.AA.jsonp" +} +""") + + listCodeSnippets.append("""{ + "P1" : "./dynamic", + "P2" : "_import", + "P3" : "s/AA/imp", + "P4" : "orted.A", + "P5" : "A.jsonp", + "[import]" : "${P1}${P2}${P3}${P4}${P5}" +} +""") + + listCodeSnippets.append("""{ + "[import]" : "./dynamic_imports/dynamic_import.R.D.jsonp" +} +""") + + listCodeSnippets.append("""{ + "[import]" : "./dynamic_imports/mixed_import.jsonp" +} +""") + + listCodeSnippets.append("""{ + "[import]" : "./dynamic_imports/parallel_import.jsonp" +} +""") + + listCodeSnippets.append("""{ + "import_files" : { + "fileAA" : "./dynamic_imports/AA/imported.AA.jsonp", + "fileBB" : "./dynamic_imports/AA/BB/imported.BB.jsonp" + }, + "[import]" : ${import_files}['fileAA'], + "[import]" : "${import_files}['fileBB']" +} +""") + + listCodeSnippets.append("""{ + "import_files" : [ + "./dynamic_imports/AA/imported.AA.jsonp", + "./dynamic_imports/AA/BB/imported.BB.jsonp" + ], + "[import]" : ${import_files}[0], + "[import]" : "${import_files}[1]" +} +""") + + listCodeSnippets.append("""{ + "dynamic_imports" : "dynamic_imports", + "global_defs" : "global_defs", + "[import]" : "./${dynamic_imports}/${global_defs}/${global_defs}_2.jsonp", + "[import]" : "./${imports_dir}/${dictDirs.AA}/${listDirs.1}/imported.BB.jsonp" +} +""") + + listCodeSnippets.append("""{ + "imports_dir" : "dynamic_imports", + "[import]" : "./${imports_dir}/cyclic_import_itself.jsonp" +} +""") + + listCodeSnippets.append("""{ + "imports_dir" : "dynamic_imports", + "[import]" : "./${imports_dir}/cyclic_import.jsonp" +} +""") + + listCodeSnippets.append("""{ + "[import]" : "./${I_AM_NOT_EXISTING}/imported.jsonp" +} +""") + + listCodeSnippets.append("""{ + "[import]" : "./I_AM_NOT_EXISTING/I_AM_NOT_EXISTING.jsonp" +} +""") + + listCodeSnippets.append("""{ + "AA" : "AA", + "[import]" : "./dynamic_imports/${AA/imported.AA.jsonp" +} +""") + +# !!! FREEZE !!! + # listCodeSnippets.append("""{ + # "AA" : "AA", + # "[import]" : "./dynamic_imports/${${AA/imported.AA.jsonp" +# } +# """) + + listCodeSnippets.append("""{ + "AA" : "AA", + "[import]__" : "./dynamic_imports/${AA}/imported.${AA}.jsonp" +} +""") + + listCodeSnippets.append("""{ + "AA" : "AA", + "__[import]" : "./dynamic_imports/${AA}/imported.${AA}.jsonp" +} +""") + + listCodeSnippets.append("""{ + "AA" : "AA", + "[import]" : "./dynamic_imports/import_err_1.jsonp" +} +""") + + listCodeSnippets.append("""{ + "[import]" : 123 +} +""") + + listCodeSnippets.append("""{ + "[import]" : [1,2,3] +} +""") + + listCodeSnippets.append("""{ + "[import]" : {"A" : 1, "B" : 2} +} +""") + + listCodeSnippets.append("""{ + "values" : {"A" : 1, "B" : 2}, + "[import]" : ${values}['A'] +} +""") + + listCodeSnippets.append("""{ + "values" : ["A", "B"], + "[import]" : ${values}[0] +} +""") + + # listCodeSnippets.append("""{ +# } +# """) + + return sHeadline, listCodeSnippets + + # eof def GetSeveralParticularSnippets(self): + + # -------------------------------------------------------------------------------------------------------------- + + def GetBracketMismatch(self): + """Assignments with missing brackets + """ + + sHeadline = "Assignments with missing brackets" + + listCodeSnippets = [] + + listCodeSnippets.append("""{ + "param1" : "value1", + "param2" : ${param1} +} +""") + + listCodeSnippets.append("""{ + "param1" : "value1", + "param2" : ${param1 +} +""") + + listCodeSnippets.append("""{ + "param1" : "value1", + "param2" : "${param1" +} +""") + + listCodeSnippets.append("""{ + "param1" : "value1", + "param2" : param1" +} +""") + + listCodeSnippets.append("""{ + "param1" : "value1", + "param2" : "param1}" +} +""") + + listCodeSnippets.append("""{ + "listparam" : ["A","B","C"], + "param" : ${listparam[0] +} +""") + + listCodeSnippets.append("""{ + "listparam" : ["A","B","C"], + "param" : "${listparam[0]" +} +""") + + listCodeSnippets.append("""{ + "listparam" : ["A","B","C"], + "param" : ${listparam}0] +} +""") + + listCodeSnippets.append("""{ + "listparam" : ["A","B","C"], + "param" : "${listparam}0]" +} +""") + + listCodeSnippets.append("""{ + "listparam" : ["A","B","C"], + "param" : ${listparam}[0 +} +""") + + listCodeSnippets.append("""{ + "listparam" : ["A","B","C"], + "param" : "${listparam}[0" +} +""") + + listCodeSnippets.append("""{ + "listparam" : ["A","B","C"], + "param" : ${${listparam}[0] +} +""") + + listCodeSnippets.append("""{ + "listparam" : ["A","B","C"], + "param" : "${${listparam}[0]" +} +""") + + listCodeSnippets.append("""{ + "listparam" : ["A","B","C"], + "param" : $}${listparam}[0] +} +""") + + listCodeSnippets.append("""{ + "listparam" : ["A","B","C"], + "param" : "$}${listparam}[0]" +} +""") + + listCodeSnippets.append("""{ + "listparam" : ["A","B","C"], + ${listparam}[0] : "value" +} +""") + + listCodeSnippets.append("""{ + "listparam" : ["A","B","C"], + ${listparam[0] : "value" +} +""") + + listCodeSnippets.append("""{ + "listparam" : ["A","B","C"], + ${listparam}0] : "value" +} +""") + + listCodeSnippets.append("""{ + "listparam" : ["A","B","C"], + ${{listparam}[0] : "value" +} +""") + + listCodeSnippets.append("""{ + "listparam" : ["A","B","C"], + ${listparam}[}0] : "value" +} +""") + + return sHeadline, listCodeSnippets + + # eof def GetBracketMismatch(self): + + # -------------------------------------------------------------------------------------------------------------- + + def GetDatatypePermutations(self): + """Data type permutations in a fix pattern. Parameter types: int, str, list, dict. + """ + + sHeadline = "Data type permutations in a fix pattern. Parameter types: int, str, list, dict." + + sDefinitions = """ "indexP" : 0, + "keyP" : "A", + "dictP" : {"A" : 1, "B" : 2}, + "listP" : ["A", "B"], +""" + + sCodeSnippetPattern = """{ +####DEFINITIONS#### +####ASSIGNMENT#### +} +""" + + listofDataTypeTuples = [] + listofDataTypeTuples.append(("indexP", "indexP")) + listofDataTypeTuples.append(("indexP", "keyP")) + listofDataTypeTuples.append(("indexP", "dictP")) + listofDataTypeTuples.append(("indexP", "listP")) + listofDataTypeTuples.append(("keyP", "indexP")) + listofDataTypeTuples.append(("keyP", "keyP")) + listofDataTypeTuples.append(("keyP", "dictP")) + listofDataTypeTuples.append(("keyP", "listP")) + listofDataTypeTuples.append(("dictP", "indexP")) + listofDataTypeTuples.append(("dictP", "keyP")) + listofDataTypeTuples.append(("dictP", "dictP")) + listofDataTypeTuples.append(("dictP", "listP")) + listofDataTypeTuples.append(("listP", "indexP")) + listofDataTypeTuples.append(("listP", "keyP")) + listofDataTypeTuples.append(("listP", "dictP")) + listofDataTypeTuples.append(("listP", "listP")) + + listAssignments = [] + + listAssignments.append(" \"newparam\" : ${XXXX}[${YYYY}]") + listAssignments.append(" \"newparam\" : \"${XXXX}[${YYYY}]\"") + listAssignments.append(" \"newparam\" : ${XXXX}['${YYYY}']") + listAssignments.append(" \"newparam\" : \"${XXXX}['${YYYY}']\"") + + listAssignments.append(" \"newparam\" : ${XXXX[${YYYY}]}") + listAssignments.append(" \"newparam\" : \"${XXXX[${YYYY}]}\"") + listAssignments.append(" \"newparam\" : ${XXXX['${YYYY}']}") + listAssignments.append(" \"newparam\" : \"${XXXX['${YYYY}']}\"") + + listAssignments.append(" \"newparam\" : ${XXXX[${YYYY}]}") + listAssignments.append(" \"newparam\" : \"${XXXX[${YYYY}]}\"") + listAssignments.append(" \"newparam\" : ${XXXX['${YYYY}']}") + listAssignments.append(" \"newparam\" : \"${XXXX['${YYYY}']}\"") + + listAssignments.append(" \"newparam\" : ${XXXX.${YYYY}}") + listAssignments.append(" \"newparam\" : \"${XXXX.${YYYY}}\"") + + listAssignments.append(" ${XXXX}[${YYYY}] : \"newvalue\"") + listAssignments.append(" \"${XXXX}[${YYYY}]\" : \"newvalue\"") + listAssignments.append(" ${XXXX}['${YYYY}'] : \"newvalue\"") + listAssignments.append(" \"${XXXX}['${YYYY}']\" : \"newvalue\"") + + listAssignments.append(" ${XXXX[${YYYY}]} : \"newvalue\"") + listAssignments.append(" \"${XXXX[${YYYY}]}\" : \"newvalue\"") + listAssignments.append(" ${XXXX['${YYYY}']} : \"newvalue\"") + listAssignments.append(" \"${XXXX['${YYYY}']}\" : \"newvalue\"") + + listAssignments.append(" ${XXXX[${YYYY}]} : \"newvalue\"") + listAssignments.append(" \"${XXXX[${YYYY}]}\" : \"newvalue\"") + listAssignments.append(" ${XXXX['${YYYY}']} : \"newvalue\"") + listAssignments.append(" \"${XXXX['${YYYY}']}\" : \"newvalue\"") + + listAssignments.append(" ${XXXX.${YYYY}} : \"newvalue\"") + listAssignments.append(" \"${XXXX.${YYYY}}\" : \"newvalue\"") + + # put all things together + + listCodeSnippets = [] + + for sAssignment in listAssignments: + for tupleDataTypes in listofDataTypeTuples: + sAssignment_repl = sAssignment.replace("XXXX", tupleDataTypes[0]) + sAssignment_repl = sAssignment_repl.replace("YYYY", tupleDataTypes[1]) + + sCodeSnippet = sCodeSnippetPattern.replace("####DEFINITIONS####", sDefinitions) + sCodeSnippet = sCodeSnippet.replace("####ASSIGNMENT####", sAssignment_repl) + listCodeSnippets.append(sCodeSnippet) + + return sHeadline, listCodeSnippets + + # eof def GetDatatypePermutations(self): + + # -------------------------------------------------------------------------------------------------------------- + + def GetNestedDataTypes(self): + """Combinations of several expressions within a data structure of multiple nested dictionaries and lists + """ + + sHeadline = "Combinations of several expressions within a data structure of multiple nested dictionaries and lists" # 1. data structure without additional blanks around brackets, sub elements at end of parent elements sDataStructure1 = """ "params" : {*01* : *02*, @@ -3074,8 +4138,8 @@ def GetNamingConventions(self): sDataStructure1 = """ "param*01*1" : "value", "param2" : "val*02*ue", - "${param2}" : 1, - "dictParam" : {"key*03*A" : 2, "keyB" : {"key*04*C" : 3}}""" + "dictParam" : {"key*03*A" : 2, "keyB" : {"key*04*C" : 3}}, + "listParam" : [1, {"key*05*D" : 4, "keyE" : {"key*06*F" : 5}}, 2]""" sCodeSnippetPattern = """{ ####DATASTRUCTURE#### @@ -3087,9 +4151,9 @@ def GetNamingConventions(self): # expression and placeholder per iteration. All remaining placeholders in current iteration are replaced by elements # from a list of filler expressions (simple letters) that are only used to complete the code snippet, but are not in focus. - listExpressions = ["-", "+", "*", "|", "/", "$", "%", "#", "\\", "\\\\"] + listExpressions = ["+", "-", "*", "/" , "|", "$", "%", "#", "\\", "\\\\", "𠼭", "€", "ß", "{", "}", "[", "]", "'"] - listPlaceholders = ["*01*", "*02*", "*03*", "*04*"] + listPlaceholders = ["*01*", "*02*", "*03*", "*04*", "*05*", "*06*"] listPositions = listPlaceholders[:] # to support a nested iteration of the same list; better readibility of code because of different names @@ -3125,62 +4189,69 @@ def GetNamingConventions(self): # -------------------------------------------------------------------------------------------------------------- def GetBlockedSubstitutions(self): - """Several snippets containing blocked dollar operator substitutions + """Several snippets containing blocked dollar operator substitutions (because of data type or dynamic key names)" """ - sHeadline = "Several snippets containing blocked dollar operator substitutions" + sHeadline = "Several snippets containing blocked dollar operator substitutions (because of data type or dynamic key names)" - listCodeSnippets = [] + # data structure 1 + sDataStructure1 = """ "*01*" : "*02*", + "param1" : {"*03*" : 5, "009" : "M_*04*_N", "011" : "OP"}, + "param2" : ["Q_*05*_R", {"*06*" : 6, "010" : "*07*_*07*", "012" : "ST"}, "*08*_*08*"], + "param3" : ${param1}['*09*'], + "param4" : ${param2}[1]['*10*'], + "param5" : ${param1.*11*}, + "param6" : ${param2.1.*12*}""" + + sDefinitions = """ "strParam" : "ABC", + "intParam" : 11, + "floatParam" : 22.22, + "dictParam" : {"A" : 3, "B" : 4}, + "listParam" : ["C", "D"], +""" - listCodeSnippets.append("""{ - "dictParam" : {"A" : 0, "B" : 1}, - "param" : "${dictParam}" + sCodeSnippetPattern = """{ +####DEFINITIONS#### +####DATASTRUCTURE#### } -""") +""" - listCodeSnippets.append("""{ - "listParam" : ["A", "B"], - "param" : "${listParam}" -} -""") + # We have a list of expressions and we have a list of placeholders like used in sDataStructure1. + # The followig code runs in a nested loop: Every expression is placed at every placeholder position. Only one single + # expression and placeholder per iteration. All remaining placeholders in current iteration are replaced by elements + # from a list of filler expressions (simple letters) that are only used to complete the code snippet, but are not in focus. - listCodeSnippets.append("""{ - "floatParam" : 1.2, - "param" : "${floatParam}" -} -""") + listExpressions = ["${strParam}", "${intParam}" , "${floatParam}" , "${dictParam}" , "${listParam}"] - listCodeSnippets.append("""{ - "dictParam" : {"A" : 0, "B" : 1}, - "${dictParam}" : 1 -} -""") + listPlaceholders = ["*01*", "*02*", "*03*", "*04*", "*05*", "*06*", "*07*", "*08*", "*09*", "*10*", "*11*", "*12*"] - listCodeSnippets.append("""{ - "listParam" : ["A", "B"], - "${listParam}" : 1 -} -""") + listPositions = listPlaceholders[:] # to support a nested iteration of the same list; better readibility of code because of different names - listCodeSnippets.append("""{ - "floatParam" : 1.2, - "${floatParam}" : 1 -} -""") + listFiller = ["001","002","003","004","005","006","007","008","009","010","011","012"] # as much elements as in listPlaceholders - listCodeSnippets.append("""{ - "keyA" : "keyA", - "dictParam" : {"${keyA}" : 1} -} -""") + # put all things together - listCodeSnippets.append("""{ - "keyA" : "keyA", - "keyB" : "keyB", - "dictParam" : {"keyA" : {}}, - ${dictParam.keyA}['${keyB}_2'] : 2 -} -""") + listCodeSnippets = [] + + # sDataStructure1 + + for sExpression in listExpressions: + for sPosition in listPositions: + sDataStructure = sDataStructure1 # init a new data structure from pattern sDataStructure1 + sCodeSnippet = sCodeSnippetPattern # init a new code snippet from code snippet pattern + oFiller = CListElements(listFiller) # init a new filler object (= content for remaining placeholders) + for sPlaceholder in listPlaceholders: + sFiller = oFiller.GetElement() + if sPosition == sPlaceholder: + sDataStructure = sDataStructure.replace(sPlaceholder, sExpression) + else: + sDataStructure = sDataStructure.replace(sPlaceholder, f"{sFiller}") + # eof for sPlaceholder in listPlaceholders: + sCodeSnippet = sCodeSnippet.replace("####DEFINITIONS####", sDefinitions) + sCodeSnippet = sCodeSnippet.replace("####DATASTRUCTURE####", sDataStructure) + listCodeSnippets.append(sCodeSnippet) + # eof for sPosition in listPositions: + # eof for sExpression in listExpressions: return sHeadline, listCodeSnippets