diff --git a/test/JPP_TestUsecases.csv b/test/JPP_TestUsecases.csv index 0e4d7cd3..7cf077ad 100644 --- a/test/JPP_TestUsecases.csv +++ b/test/JPP_TestUsecases.csv @@ -69,6 +69,7 @@ JPP_0507|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file containing several string conc JPP_0508|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file containing several string concatenations in separate lines (2) JPP_0509|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file containing several parameter assignments in separate lines (different syntax) JPP_0510|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file containing several parameter assignments in separate lines (extended string concatenation) +JPP_0511|COMPOSITE_EXPRESSIONS|GOODCASE|JSON file containing a list; list index is defined by a parameter JPP_0550|COMPOSITE_EXPRESSIONS|BADCASE|JSON file with composite data structure (nested lists and dictionaries / some key names with dots inside) JPP_0600|CODE_COMMENTS|GOODCASE|JSON file with several combinations of code comments JPP_0950|COMMON_SYNTAX_VIOLATIONS|BADCASE|JSON file with syntax error (1) @@ -78,6 +79,15 @@ JPP_0953|COMMON_SYNTAX_VIOLATIONS|BADCASE|JSON file with syntax error (4): file JPP_0954|COMMON_SYNTAX_VIOLATIONS|BADCASE|JSON file with syntax error (5): file is empty (multiple pairs of brackets only) JPP_1000|IMPLICIT_CREATION|GOODCASE|JSON file with dictionary keys to be created implicitly JPP_1001|IMPLICIT_CREATION|GOODCASE|JSON file with dictionary keys to be created implicitly (same key names at all levels) +JPP_1050|IMPLICIT_CREATION|BADCASE|JSON file with implicit creation of data structures based on parameters (1) +JPP_1051|IMPLICIT_CREATION|BADCASE|JSON file with implicit creation of data structures based on parameters (2) +JPP_1052|IMPLICIT_CREATION|BADCASE|JSON file with implicit creation of data structures based on parameters (3) +JPP_1053|IMPLICIT_CREATION|BADCASE|JSON file with implicit creation of data structures based on parameters (4) +JPP_1054|IMPLICIT_CREATION|BADCASE|JSON file with implicit creation of data structures based on parameters (5) +JPP_1055|IMPLICIT_CREATION|BADCASE|JSON file with implicit creation of data structures based on parameters (5) +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_1200|PATH_FORMATS|GOODCASE|Relative path to JSON file diff --git a/test/JPP_TestUsecases.html b/test/JPP_TestUsecases.html index e37e35da..e844199b 100644 --- a/test/JPP_TestUsecases.html +++ b/test/JPP_TestUsecases.html @@ -2340,6 +2340,39 @@ 70 + + + +JPP_0511 + + + + +COMPOSITE_EXPRESSIONS + + + + +GOODCASE + + + + +JSON file containing a list; list index is defined by a parameter
+Expected: JsonPreprocessor returns expected value + + +
+ + + + + + + +71 + + @@ -2371,7 +2404,7 @@ -71 +72 @@ -2404,7 +2437,7 @@ -72 +73 @@ -2437,7 +2470,7 @@ -73 +74 @@ -2470,7 +2503,7 @@ -74 +75 @@ -2503,7 +2536,7 @@ -75 +76 @@ -2536,7 +2569,7 @@ -76 +77 @@ -2569,7 +2602,7 @@ -77 +78 @@ -2602,7 +2635,7 @@ -78 +79 @@ -2635,7 +2668,304 @@ -79 +80 + + + + + +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 + + +
+ + + + + + + +81 + + + + + +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 + + +
+ + + + + + + +82 + + + + + +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 + + +
+ + + + + + + +83 + + + + + +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 + + +
+ + + + + + + +84 + + + + + +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 + + +
+ + + + + + + +85 + + + + + +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 + + +
+ + + + + + + +86 + + + + + +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 + + +
+ + + + + + + +87 + + + + + +JPP_1057 + + + + +IMPLICIT_CREATION + + + + +BADCASE + + + + +JSON file with implicit creation of data structures based on parameters (7)
+Expected: No values are returned, and JsonPreprocessor throws an exception + + +
+ + + + + + + +88 + + + + + +JPP_1058 + + + + +IMPLICIT_CREATION + + + + +BADCASE + + + + +JSON file with implicit creation of data structures based on parameters (8)
+Expected: No values are returned, and JsonPreprocessor throws an exception + + +
+ + + + + + + +89 @@ -2668,7 +2998,7 @@ -80 +90 @@ -2701,7 +3031,7 @@ -81 +91 @@ -2735,7 +3065,7 @@
 

-
Generated: 20.11.2023 - 15:42:16
+
Generated: 10.01.2024 - 12:25:22
 
diff --git a/test/JPP_TestUsecases.rst b/test/JPP_TestUsecases.rst index b8213208..90d36826 100644 --- a/test/JPP_TestUsecases.rst +++ b/test/JPP_TestUsecases.rst @@ -763,6 +763,16 @@ Test Use Cases ---- +* **Test JPP_0511** + + [COMPOSITE_EXPRESSIONS / GOODCASE] + + **JSON file containing a list; list index is defined by a parameter** + + Expected: JsonPreprocessor returns expected value + +---- + * **Test JPP_0550** [COMPOSITE_EXPRESSIONS / BADCASE] @@ -855,6 +865,96 @@ Test Use Cases ---- +* **Test 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 + +---- + +* **Test 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 + +---- + +* **Test 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 + +---- + +* **Test 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 + +---- + +* **Test 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 + +---- + +* **Test 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 + +---- + +* **Test 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 + +---- + +* **Test JPP_1057** + + [IMPLICIT_CREATION / BADCASE] + + **JSON file with implicit creation of data structures based on parameters (7)** + + Expected: No values are returned, and JsonPreprocessor throws an exception + +---- + +* **Test JPP_1058** + + [IMPLICIT_CREATION / BADCASE] + + **JSON file with implicit creation of data structures based on parameters (8)** + + Expected: No values are returned, and JsonPreprocessor throws an exception + +---- + * **Test JPP_1150** [CYCLIC_IMPORTS / BADCASE] @@ -887,5 +987,5 @@ Test Use Cases ---- -Generated: 20.11.2023 - 15:42:16 +Generated: 10.01.2024 - 12:25:22 diff --git a/test/JPP_TestUsecases.txt b/test/JPP_TestUsecases.txt index 41d51a22..b6015cb1 100644 --- a/test/JPP_TestUsecases.txt +++ b/test/JPP_TestUsecases.txt @@ -320,6 +320,10 @@ Test JPP_0510 / COMPOSITE_EXPRESSIONS / GOODCASE Description: JSON file containing several parameter assignments in separate lines (extended string concatenation) Expectation: JsonPreprocessor returns expected value ------------------------------------------------------------------------------------------------------------------------ +Test JPP_0511 / COMPOSITE_EXPRESSIONS / GOODCASE +Description: JSON file containing a list; list index is defined by a parameter +Expectation: JsonPreprocessor returns expected value +------------------------------------------------------------------------------------------------------------------------ Test JPP_0550 / COMPOSITE_EXPRESSIONS / BADCASE Description: JSON file with composite data structure (nested lists and dictionaries / some key names with dots inside) Expectation: No values are returned, and JsonPreprocessor throws an exception @@ -357,6 +361,42 @@ Test JPP_1001 / IMPLICIT_CREATION / GOODCASE Description: JSON file with dictionary keys to be created implicitly (same key names at all levels) Expectation: JsonPreprocessor returns values ------------------------------------------------------------------------------------------------------------------------ +Test JPP_1050 / IMPLICIT_CREATION / BADCASE +Description: JSON file with implicit creation of data structures based on parameters (1) +Expectation: No values are returned, and JsonPreprocessor throws an exception +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1051 / IMPLICIT_CREATION / BADCASE +Description: JSON file with implicit creation of data structures based on parameters (2) +Expectation: No values are returned, and JsonPreprocessor throws an exception +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1052 / IMPLICIT_CREATION / BADCASE +Description: JSON file with implicit creation of data structures based on parameters (3) +Expectation: No values are returned, and JsonPreprocessor throws an exception +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1053 / IMPLICIT_CREATION / BADCASE +Description: JSON file with implicit creation of data structures based on parameters (4) +Expectation: No values are returned, and JsonPreprocessor throws an exception +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1054 / IMPLICIT_CREATION / BADCASE +Description: JSON file with implicit creation of data structures based on parameters (5) +Expectation: No values are returned, and JsonPreprocessor throws an exception +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1055 / IMPLICIT_CREATION / BADCASE +Description: JSON file with implicit creation of data structures based on parameters (5) +Expectation: No values are returned, and JsonPreprocessor throws an exception +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1056 / IMPLICIT_CREATION / BADCASE +Description: JSON file with implicit creation of data structures based on parameters (6) +Expectation: No values are returned, and JsonPreprocessor throws an exception +------------------------------------------------------------------------------------------------------------------------ +Test JPP_1057 / IMPLICIT_CREATION / BADCASE +Description: JSON file with implicit creation of data structures based on parameters (7) +Expectation: No values are returned, and JsonPreprocessor throws an exception +------------------------------------------------------------------------------------------------------------------------ +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) Expectation: No values are returned, and JsonPreprocessor throws an exception @@ -370,5 +410,5 @@ Description: Relative path to JSON file Expectation: JsonPreprocessor resolves the relative path and returns values from JSON file Hint.......: Works with raw path to JSON file (path not normalized internally) ------------------------------------------------------------------------------------------------------------------------ -Generated: 20.11.2023 - 15:42:16 +Generated: 10.01.2024 - 12:25:22 diff --git a/test/component_test.py b/test/component_test.py index c4de2027..634c513e 100644 --- a/test/component_test.py +++ b/test/component_test.py @@ -22,8 +22,8 @@ # # -------------------------------------------------------------------------------------------------------------- # -VERSION = "0.20.0" -VERSION_DATE = "14.12.2023" +VERSION = "0.22.0" +VERSION_DATE = "10.01.2024" # # -------------------------------------------------------------------------------------------------------------- #TM*** diff --git a/test/pytest/pytestfiles/test_04_PARAMETER_SUBSTITUTION_BADCASE.py b/test/pytest/pytestfiles/test_04_PARAMETER_SUBSTITUTION_BADCASE.py index 279acb4b..7957f35a 100644 --- a/test/pytest/pytestfiles/test_04_PARAMETER_SUBSTITUTION_BADCASE.py +++ b/test/pytest/pytestfiles/test_04_PARAMETER_SUBSTITUTION_BADCASE.py @@ -18,7 +18,7 @@ # # XC-CT/ECA3-Queckenstedt # -# 20.11.2023 - 15:42:16 +# 10.01.2024 - 12:25:22 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_07_COMPOSITE_EXPRESSIONS_GOODCASE.py b/test/pytest/pytestfiles/test_07_COMPOSITE_EXPRESSIONS_GOODCASE.py index ebbf359d..f125caec 100644 --- a/test/pytest/pytestfiles/test_07_COMPOSITE_EXPRESSIONS_GOODCASE.py +++ b/test/pytest/pytestfiles/test_07_COMPOSITE_EXPRESSIONS_GOODCASE.py @@ -18,7 +18,7 @@ # # XC-CT/ECA3-Queckenstedt # -# 20.11.2023 - 15:42:16 +# 09.01.2024 - 17:01:37 # # -------------------------------------------------------------------------------------------------------------- @@ -109,4 +109,12 @@ def test_JPP_0509(self, Description): def test_JPP_0510(self, Description): nReturn = CExecute.Execute("JPP_0510") assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: JsonPreprocessor returns expected value + @pytest.mark.parametrize( + "Description", ["JSON file containing a list; list index is defined by a parameter",] + ) + def test_JPP_0511(self, Description): + nReturn = CExecute.Execute("JPP_0511") + assert nReturn == 0 # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_08_COMPOSITE_EXPRESSIONS_BADCASE.py b/test/pytest/pytestfiles/test_08_COMPOSITE_EXPRESSIONS_BADCASE.py index 91d5a125..d5da154a 100644 --- a/test/pytest/pytestfiles/test_08_COMPOSITE_EXPRESSIONS_BADCASE.py +++ b/test/pytest/pytestfiles/test_08_COMPOSITE_EXPRESSIONS_BADCASE.py @@ -18,7 +18,7 @@ # # XC-CT/ECA3-Queckenstedt # -# 10.10.2023 - 13:31:11 +# 10.01.2024 - 12:25:22 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_12_IMPLICIT_CREATION_BADCASE.py b/test/pytest/pytestfiles/test_12_IMPLICIT_CREATION_BADCASE.py new file mode 100644 index 00000000..2bf499e9 --- /dev/null +++ b/test/pytest/pytestfiles/test_12_IMPLICIT_CREATION_BADCASE.py @@ -0,0 +1,104 @@ +# ************************************************************************************************************** +# 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_12_IMPLICIT_CREATION_BADCASE.py +# +# XC-CT/ECA3-Queckenstedt +# +# 10.01.2024 - 12:25:22 +# +# -------------------------------------------------------------------------------------------------------------- + +import pytest +from pytestlibs.CExecute import CExecute + +# -------------------------------------------------------------------------------------------------------------- + +class Test_IMPLICIT_CREATION_BADCASE: + +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file with implicit creation of data structures based on parameters (1)",] + ) + def test_JPP_1050(self, Description): + nReturn = CExecute.Execute("JPP_1050") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file with implicit creation of data structures based on parameters (2)",] + ) + def test_JPP_1051(self, Description): + nReturn = CExecute.Execute("JPP_1051") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file with implicit creation of data structures based on parameters (3)",] + ) + def test_JPP_1052(self, Description): + nReturn = CExecute.Execute("JPP_1052") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file with implicit creation of data structures based on parameters (4)",] + ) + def test_JPP_1053(self, Description): + nReturn = CExecute.Execute("JPP_1053") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file with implicit creation of data structures based on parameters (5)",] + ) + def test_JPP_1054(self, Description): + nReturn = CExecute.Execute("JPP_1054") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file with implicit creation of data structures based on parameters (5)",] + ) + def test_JPP_1055(self, Description): + nReturn = CExecute.Execute("JPP_1055") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file with implicit creation of data structures based on parameters (6)",] + ) + def test_JPP_1056(self, Description): + nReturn = CExecute.Execute("JPP_1056") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file with implicit creation of data structures based on parameters (7)",] + ) + def test_JPP_1057(self, Description): + nReturn = CExecute.Execute("JPP_1057") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- + # Expected: No values are returned, and JsonPreprocessor throws an exception + @pytest.mark.parametrize( + "Description", ["JSON file with implicit creation of data structures based on parameters (8)",] + ) + def test_JPP_1058(self, Description): + nReturn = CExecute.Execute("JPP_1058") + assert nReturn == 0 +# -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_12_CYCLIC_IMPORTS_BADCASE.py b/test/pytest/pytestfiles/test_13_CYCLIC_IMPORTS_BADCASE.py similarity index 97% rename from test/pytest/pytestfiles/test_12_CYCLIC_IMPORTS_BADCASE.py rename to test/pytest/pytestfiles/test_13_CYCLIC_IMPORTS_BADCASE.py index 7601d111..c38a70a3 100644 --- a/test/pytest/pytestfiles/test_12_CYCLIC_IMPORTS_BADCASE.py +++ b/test/pytest/pytestfiles/test_13_CYCLIC_IMPORTS_BADCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_12_CYCLIC_IMPORTS_BADCASE.py +# test_13_CYCLIC_IMPORTS_BADCASE.py # # XC-CT/ECA3-Queckenstedt # -# 10.10.2023 - 13:31:11 +# 09.01.2024 - 11:50:58 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/pytest/pytestfiles/test_13_PATH_FORMATS_GOODCASE.py b/test/pytest/pytestfiles/test_14_PATH_FORMATS_GOODCASE.py similarity index 96% rename from test/pytest/pytestfiles/test_13_PATH_FORMATS_GOODCASE.py rename to test/pytest/pytestfiles/test_14_PATH_FORMATS_GOODCASE.py index e5d97ecf..089c0276 100644 --- a/test/pytest/pytestfiles/test_13_PATH_FORMATS_GOODCASE.py +++ b/test/pytest/pytestfiles/test_14_PATH_FORMATS_GOODCASE.py @@ -14,11 +14,11 @@ # limitations under the License. # -------------------------------------------------------------------------------------------------------------- # -# test_13_PATH_FORMATS_GOODCASE.py +# test_14_PATH_FORMATS_GOODCASE.py # # XC-CT/ECA3-Queckenstedt # -# 10.10.2023 - 13:31:11 +# 09.01.2024 - 11:50:58 # # -------------------------------------------------------------------------------------------------------------- diff --git a/test/testconfig/TestConfig.py b/test/testconfig/TestConfig.py index e6621ef4..8478a876 100644 --- a/test/testconfig/TestConfig.py +++ b/test/testconfig/TestConfig.py @@ -22,7 +22,7 @@ # # -------------------------------------------------------------------------------------------------------------- # -# 14.12.2023 +# 09.01.2024 # # !!! Temporarily tests are deactivated by the following line commented out: # # # listofdictUsecases.append(dictUsecase) @@ -1281,6 +1281,20 @@ listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0268" +dictUsecase['DESCRIPTION'] = "JSON file containing a list; list index is defined by a parameter and wrapped in single quotes" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "PARAMETER_SUBSTITUTION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = "List indices must be of type 'int'" +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0268.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "List indices must be of type 'int' (error message placeholder)" +dictUsecase['EXPECTEDRETURN'] = None +# # listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_0300" @@ -1989,6 +2003,23 @@ listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0511" +dictUsecase['DESCRIPTION'] = "JSON file containing a list; list index is defined by a parameter" +dictUsecase['EXPECTATION'] = "JsonPreprocessor returns expected value" +dictUsecase['SECTION'] = "COMPOSITE_EXPRESSIONS" +dictUsecase['SUBSECTION'] = "GOODCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0511.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = None +dictUsecase['EXPECTEDRETURN'] = """ +[DICT] (2/1) > {intval} [INT] : 1 +[DICT] (2/2) > {listval} [LIST] (2/1) > [STR] : 'B' +[DICT] (2/2) > {listval} [LIST] (2/2) > [INT] : 4""" +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_0550" @@ -2004,6 +2035,48 @@ listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0551" +dictUsecase['DESCRIPTION'] = "JSON file containing a list; list index is defined by a parameter and wrapped in single quotes" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "COMPOSITE_EXPRESSIONS" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = "List indices must be of type 'int'" +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0551.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "List indices must be of type 'int' (error message placeholder)" +dictUsecase['EXPECTEDRETURN'] = None +# # listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0552" +dictUsecase['DESCRIPTION'] = "JSON file containing a list; list index is defined by a parameter and placed inside the curly brackets (invalid syntax)" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "COMPOSITE_EXPRESSIONS" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0552.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "Invalid syntax: Found index" +dictUsecase['EXPECTEDRETURN'] = None +# # listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_0553" +dictUsecase['DESCRIPTION'] = "JSON file containing a list; list index is defined by a parameter, wrapped in single quotes and placed inside the curly brackets (invalid syntax)" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "COMPOSITE_EXPRESSIONS" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_0553.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "Invalid syntax: Found index" +dictUsecase['EXPECTEDRETURN'] = None +# # listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} dictUsecase['TESTID'] = "JPP_0600" @@ -2142,15 +2215,6 @@ [DICT] (2/1) > {dTestDict} [DICT] (5/5) > {kVal_4} [DICT] (1/1) > {kVal_4B} [DICT] (1/1) > {kVal_4C} [DICT] (3/3) > {kVal_4D} [DICT] (1/1) > {kVal_4E} [DICT] (1/1) > {kVal_4F} [DICT] (1/1) > {kVal_4G} [DICT] (2/2) > {D} [LIST] (2/2) > [INT] : 4 [DICT] (2/2) > {Val_1_extended} [STR] : 'Val_1' """ -# Comment out these test result due to the implicit creation of data structures based on nested parameters is temporary disabled. -# [DICT] (4/1) > {dTestDict} [DICT] (6/6) > {kVal_5} [DICT] (1/1) > {kVal_5B} [DICT] (3/1) > {E} [INT] : 3 -# [DICT] (4/1) > {dTestDict} [DICT] (6/6) > {kVal_5} [DICT] (1/1) > {kVal_5B} [DICT] (3/2) > {F} [LIST] (2/1) > [INT] : 5 -# [DICT] (4/1) > {dTestDict} [DICT] (6/6) > {kVal_5} [DICT] (1/1) > {kVal_5B} [DICT] (3/2) > {F} [LIST] (2/2) > [INT] : 6 -# [DICT] (4/1) > {dTestDict} [DICT] (6/6) > {kVal_5} [DICT] (1/1) > {kVal_5B} [DICT] (3/3) > {kVal_5C} [DICT] (2/1) > {G} [INT] : 4 -# [DICT] (4/1) > {dTestDict} [DICT] (6/6) > {kVal_5} [DICT] (1/1) > {kVal_5B} [DICT] (3/3) > {kVal_5C} [DICT] (2/2) > {H} [LIST] (2/1) > [INT] : 7 -# [DICT] (4/1) > {dTestDict} [DICT] (6/6) > {kVal_5} [DICT] (1/1) > {kVal_5B} [DICT] (3/3) > {kVal_5C} [DICT] (2/2) > {H} [LIST] (2/2) > [INT] : 8 -# [DICT] (4/2) > {kVal_5B_name} [STR] : 'kVal_5B' -# [DICT] (4/3) > {kVal_5C_name} [STR] : 'kVal_5C' listofdictUsecases.append(dictUsecase) del dictUsecase # -------------------------------------------------------------------------------------------------------------- @@ -2175,6 +2239,133 @@ # -------------------------------------------------------------------------------------------------------------- # -------------------------------------------------------------------------------------------------------------- dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1050" +dictUsecase['DESCRIPTION'] = "JSON file with implicit creation of data structures based on parameters (1)" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "IMPLICIT_CREATION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1050.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "The implicit creation of data structures based on nested parameter is not supported" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1051" +dictUsecase['DESCRIPTION'] = "JSON file with implicit creation of data structures based on parameters (2)" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "IMPLICIT_CREATION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1051.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "The implicit creation of data structures based on nested parameter is not supported" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1052" +dictUsecase['DESCRIPTION'] = "JSON file with implicit creation of data structures based on parameters (3)" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "IMPLICIT_CREATION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1052.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "The implicit creation of data structures based on nested parameter is not supported" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1053" +dictUsecase['DESCRIPTION'] = "JSON file with implicit creation of data structures based on parameters (4)" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "IMPLICIT_CREATION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1053.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "Only simple data types are allowed to be substituted inside" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1054" +dictUsecase['DESCRIPTION'] = "JSON file with implicit creation of data structures based on parameters (5)" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "IMPLICIT_CREATION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1054.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "Only simple data types are allowed to be substituted inside" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1055" +dictUsecase['DESCRIPTION'] = "JSON file with implicit creation of data structures based on parameters (5)" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "IMPLICIT_CREATION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1055.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "Only simple data types are allowed to be substituted inside" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1056" +dictUsecase['DESCRIPTION'] = "JSON file with implicit creation of data structures based on parameters (6)" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "IMPLICIT_CREATION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1056.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "The implicit creation of data structures based on nested parameter is not supported" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1057" +dictUsecase['DESCRIPTION'] = "JSON file with implicit creation of data structures based on parameters (7)" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "IMPLICIT_CREATION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1057.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "Could not set variable 'testdict[C][C]' with value '4'! Reason: name 'C' is not defined" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} +dictUsecase['TESTID'] = "JPP_1058" +dictUsecase['DESCRIPTION'] = "JSON file with implicit creation of data structures based on parameters (8)" +dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" +dictUsecase['SECTION'] = "IMPLICIT_CREATION" +dictUsecase['SUBSECTION'] = "BADCASE" +dictUsecase['HINT'] = None +dictUsecase['COMMENT'] = None +dictUsecase['JSONFILE'] = r"..\testfiles\jpp-test_config_1058.jsonp" +dictUsecase['EXPECTEDEXCEPTION'] = "The implicit creation of data structures based on nested parameter is not supported" +dictUsecase['EXPECTEDRETURN'] = None +listofdictUsecases.append(dictUsecase) +del dictUsecase +# -------------------------------------------------------------------------------------------------------------- +# -------------------------------------------------------------------------------------------------------------- +dictUsecase = {} dictUsecase['TESTID'] = "JPP_1150" dictUsecase['DESCRIPTION'] = "JSON file with cyclic imports (JSON file imports itself)" dictUsecase['EXPECTATION'] = "No values are returned, and JsonPreprocessor throws an exception" diff --git a/test/testfiles/import/import.1/import.1.1/jpp-test_config_implicit_creation.1.1.1.jsonp b/test/testfiles/import/import.1/import.1.1/jpp-test_config_implicit_creation.1.1.1.jsonp index 54bd88a9..0ad12b4c 100644 --- a/test/testfiles/import/import.1/import.1.1/jpp-test_config_implicit_creation.1.1.1.jsonp +++ b/test/testfiles/import/import.1/import.1.1/jpp-test_config_implicit_creation.1.1.1.jsonp @@ -19,14 +19,5 @@ // mixture of dotdict and standard notation: ${dTestDict.kVal_4}['kVal_4B']['kVal_4C'] : {"A" : 1, "B" : [1,2]}, ${dTestDict.kVal_4.kVal_4B.kVal_4C.kVal_4D.kVal_4E}['kVal_4F']['kVal_4G'] : {"C" : 2, "D" : [3,4]} - // sub key defined by parameter: (Temporary disable implicit creation of data structures based on nested parameters) - // "kVal_5B_name" : "kVal_5B", - // "kVal_5C_name" : "kVal_5C", - // ${dTestDict.kVal_5.${kVal_5B_name}} : {"E" : 3, "F" : [5,6]}, - // ${dTestDict.kVal_5}['${kVal_5B_name}']['${kVal_5C_name}'] : {"G" : 4, "H" : [7,8]} - // - // invalid parameter format (reference: https://github.com/test-fullautomation/python-jsonpreprocessor/issues/153) - // ${dTestDict.${kVal_5B_name}.${kVal_5C_name}.kVal_5D} : {"M" : 5, "N" : [0,9]} - // ${dTestDict.${kVal_5B_name}.${kVal_5C_name}}['kVal_5D'] : {"M" : 5, "N" : [0,9]} } diff --git a/test/testfiles/jpp-test_config_0268.jsonp b/test/testfiles/jpp-test_config_0268.jsonp new file mode 100644 index 00000000..93b678fc --- /dev/null +++ b/test/testfiles/jpp-test_config_0268.jsonp @@ -0,0 +1,19 @@ +// 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. +//************************************************************************** +{ + "intval" : 1, + "listval" : ["B", 2], + "param_${listval}['${intval}']}" : 3 +} \ No newline at end of file diff --git a/test/testfiles/jpp-test_config_0511.jsonp b/test/testfiles/jpp-test_config_0511.jsonp new file mode 100644 index 00000000..c34931ab --- /dev/null +++ b/test/testfiles/jpp-test_config_0511.jsonp @@ -0,0 +1,20 @@ +// 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. +//************************************************************************** +{ + "intval" : 1, + "listval" : ["B", 2], + ${listval}[${intval}] : 4 +} + diff --git a/test/testfiles/jpp-test_config_0551.jsonp b/test/testfiles/jpp-test_config_0551.jsonp new file mode 100644 index 00000000..96e59e59 --- /dev/null +++ b/test/testfiles/jpp-test_config_0551.jsonp @@ -0,0 +1,19 @@ +// 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. +//************************************************************************** +{ + "intval" : 1, + "listval" : ["B", 2], + ${listval}['${intval}'] : 4 +} diff --git a/test/testfiles/jpp-test_config_0552.jsonp b/test/testfiles/jpp-test_config_0552.jsonp new file mode 100644 index 00000000..ddbf0be6 --- /dev/null +++ b/test/testfiles/jpp-test_config_0552.jsonp @@ -0,0 +1,19 @@ +// 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. +//************************************************************************** +{ + "intval" : 1, + "listval" : ["B", 2], + ${listval[${intval}]} : 4 +} diff --git a/test/testfiles/jpp-test_config_0553.jsonp b/test/testfiles/jpp-test_config_0553.jsonp new file mode 100644 index 00000000..bf53e4b2 --- /dev/null +++ b/test/testfiles/jpp-test_config_0553.jsonp @@ -0,0 +1,19 @@ +// 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. +//************************************************************************** +{ + "intval" : 1, + "listval" : ["B", 2], + ${listval['${intval}']} : 4 +} diff --git a/test/testfiles/jpp-test_config_1001.jsonp b/test/testfiles/jpp-test_config_1001.jsonp index bbb17486..02ed0c06 100644 --- a/test/testfiles/jpp-test_config_1001.jsonp +++ b/test/testfiles/jpp-test_config_1001.jsonp @@ -23,7 +23,6 @@ "subkey" : { "paramA" : "ABC", ${param3.subkey.subkey.paramA} : "DEF", - // https://github.com/test-fullautomation/robotframework-testsuitesmanagement/issues/224 "paramA" : ${param2.subkey.subkey.subkey}, "paramB" : "XYZ", ${param3.subkey.subkey.paramB} : ${param2.subkey.subkey.subkey} @@ -31,3 +30,15 @@ } } } + +// Caution: +// The implicit creation of data structures is only possible with hard coded key names. Parameters are not resolved. +// See: +// "paramA" : "ABC", +// ${param3.subkey.subkey.paramA} : "DEF", +// The name of the last implicitely created key within the expression ${param3.subkey.subkey.paramA} +// is "paramA", and not the value "ABC" of the parameter with the same name ("paramA"). + + + + diff --git a/test/testfiles/jpp-test_config_1050.jsonp b/test/testfiles/jpp-test_config_1050.jsonp new file mode 100644 index 00000000..321a056a --- /dev/null +++ b/test/testfiles/jpp-test_config_1050.jsonp @@ -0,0 +1,21 @@ +// 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. +//************************************************************************** + +{ + "testdict" : {"A" : 1}, + "name" : "C", + ${testdict.B}['${name}'] : 2 +} + diff --git a/test/testfiles/jpp-test_config_1051.jsonp b/test/testfiles/jpp-test_config_1051.jsonp new file mode 100644 index 00000000..1d63e26b --- /dev/null +++ b/test/testfiles/jpp-test_config_1051.jsonp @@ -0,0 +1,21 @@ +// 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. +//************************************************************************** + +{ + "testdict" : {"A" : 1}, + "name" : "C", + ${testdict.B.${name}} : 2 +} + diff --git a/test/testfiles/jpp-test_config_1052.jsonp b/test/testfiles/jpp-test_config_1052.jsonp new file mode 100644 index 00000000..4028d7da --- /dev/null +++ b/test/testfiles/jpp-test_config_1052.jsonp @@ -0,0 +1,21 @@ +// 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. +//************************************************************************** + +{ + "testdict" : {"A" : 1}, + "name" : "C", + ${testdict}['${name}']['${name}'] : 2 +} + diff --git a/test/testfiles/jpp-test_config_1053.jsonp b/test/testfiles/jpp-test_config_1053.jsonp new file mode 100644 index 00000000..29b69f56 --- /dev/null +++ b/test/testfiles/jpp-test_config_1053.jsonp @@ -0,0 +1,21 @@ +// 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. +//************************************************************************** + +{ + "name" : "C", + "testdict2" : {"B" : 2}, + ${somethingnotexisting.${testdict2}}['${name}'] : 4 +} + diff --git a/test/testfiles/jpp-test_config_1054.jsonp b/test/testfiles/jpp-test_config_1054.jsonp new file mode 100644 index 00000000..60fcd02e --- /dev/null +++ b/test/testfiles/jpp-test_config_1054.jsonp @@ -0,0 +1,21 @@ +// 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. +//************************************************************************** + +{ + "name" : "C", + "testdict" : {"B" : 2}, + ${testdict.${testdict}}['${name}'] : 4 +} + diff --git a/test/testfiles/jpp-test_config_1055.jsonp b/test/testfiles/jpp-test_config_1055.jsonp new file mode 100644 index 00000000..4bd33f3b --- /dev/null +++ b/test/testfiles/jpp-test_config_1055.jsonp @@ -0,0 +1,21 @@ +// 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. +//************************************************************************** + +{ + "name" : "C", + "testlist" : ["B", 2], + ${testlist.${testlist}}['${name}'] : 4 +} + diff --git a/test/testfiles/jpp-test_config_1056.jsonp b/test/testfiles/jpp-test_config_1056.jsonp new file mode 100644 index 00000000..f96893a0 --- /dev/null +++ b/test/testfiles/jpp-test_config_1056.jsonp @@ -0,0 +1,21 @@ +// 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. +//************************************************************************** + +{ + "testdict" : {"A" : 1}, + "name" : "C", + ${testdict.${name}}['${name}'] : 5 +} + diff --git a/test/testfiles/jpp-test_config_1057.jsonp b/test/testfiles/jpp-test_config_1057.jsonp new file mode 100644 index 00000000..00f03ef0 --- /dev/null +++ b/test/testfiles/jpp-test_config_1057.jsonp @@ -0,0 +1,21 @@ +// 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. +//************************************************************************** + +{ + "testdict" : {"A" : 1}, + "name" : "C", + ${testdict}[${name}][${name}] : 4 +} + diff --git a/test/testfiles/jpp-test_config_1058.jsonp b/test/testfiles/jpp-test_config_1058.jsonp new file mode 100644 index 00000000..49e1a75e --- /dev/null +++ b/test/testfiles/jpp-test_config_1058.jsonp @@ -0,0 +1,19 @@ +// 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. +//************************************************************************** +{ + "testdict" : {"A" : 1}, + "name" : "C", + ${testdict.${name}}['${name}'] : 5 +}