diff --git a/atest/jsonpreprocessor/test_jsonpreprocessor.py b/atest/jsonpreprocessor/test_jsonpreprocessor.py index 2d3ca65c..6b6cd25f 100644 --- a/atest/jsonpreprocessor/test_jsonpreprocessor.py +++ b/atest/jsonpreprocessor/test_jsonpreprocessor.py @@ -358,4 +358,128 @@ def test_none_true_false_datatype(self): assert oJsonData['convert_true_to_string'] == '"True"' assert oJsonData['convert_false_to_string'] == '"False"' assert oJsonData['params']['global'] == JSONFORMAT_NONE_TRUE_FALSE['params']['global'] - assert oJsonData['preprocessor']['definitions'] == JSONFORMAT_NONE_TRUE_FALSE['preprocessor']['definitions'] \ No newline at end of file + assert oJsonData['preprocessor']['definitions'] == JSONFORMAT_NONE_TRUE_FALSE['preprocessor']['definitions'] + +class TestUTF8Encoding: + + def test_utf8_encoding(self): + ''' + Test utf-8 encoding + ''' + sJsonfile = os.path.abspath("../testdata/config/08_utf8_encoding/utf8_format.json") + oJsonPreprocessor = CJsonPreprocessor(syntax="python") + oJsonData = oJsonPreprocessor.jsonLoad(sJsonfile) + assert oJsonData['German'] == "Dies ist der UTF-8 SälfTest" + assert oJsonData['Vietnamese'] == "Đây là bản tự kiểm tra UTF-8" + assert oJsonData['Japanese'] == "これは UTF-8 セルフテストです" + assert oJsonData['Hindi'] == "यह UTF-8 सेल्फ़टेस्ट है" + assert oJsonData['Thai'] == "นี่คือการทดสอบตัวเอง UTF-8" + assert oJsonData['Korean'] == "이것은 UTF-8 자체 테스트입니다" + assert oJsonData['Chinese'] == "這是 UTF-8 自測" + + def test_utf8_encoding_both_key_and_value(self): + ''' + Test utf-8 encoding in both key and value in json configuration file. + ''' + sJsonfile = os.path.abspath("../testdata/config/08_utf8_encoding/utf8_format_02.json") + oJsonPreprocessor = CJsonPreprocessor(syntax="python") + oJsonData = oJsonPreprocessor.jsonLoad(sJsonfile) + assert oJsonData['Tiếng Đức'] == "Dies ist der UTF-8 SälfTest" + assert oJsonData['Tiếng Việt'] == "Đây là bản tự kiểm tra UTF-8" + assert oJsonData['日本'] == "これは UTF-8 セルフテストです" + assert oJsonData['हिंदी'] == "यह UTF-8 सेल्फ़टेस्ट है" + assert oJsonData['แบบไทย'] == "นี่คือการทดสอบตัวเอง UTF-8" + assert oJsonData['한국인'] == "이것은 UTF-8 자체 테스트입니다" + assert oJsonData['中國人'] == "這是 UTF-8 自測" + + def test_utf8_encoding_imported_01(self): + ''' + Test utf-8 encoding file is imported to other normal json config file + ''' + sJsonfile = os.path.abspath("../testdata/config/02_import_json/import_file_utf8_format_01.json") + oJsonPreprocessor = CJsonPreprocessor(syntax="python") + oJsonData = oJsonPreprocessor.jsonLoad(sJsonfile) + assert oJsonData['German'] == "Dies ist der UTF-8 SälfTest" + assert oJsonData['Vietnamese'] == "Đây là bản tự kiểm tra UTF-8" + assert oJsonData['Japanese'] == "これは UTF-8 セルフテストです" + assert oJsonData['Hindi'] == "यह UTF-8 सेल्फ़टेस्ट है" + assert oJsonData['Thai'] == "นี่คือการทดสอบตัวเอง UTF-8" + assert oJsonData['Korean'] == "이것은 UTF-8 자체 테스트입니다" + assert oJsonData['Chinese'] == "這是 UTF-8 自測" + + def test_utf8_encoding_imported_02(self): + ''' + Test utf-8 encoding file is imported to other utf8 json config file + ''' + sJsonfile = os.path.abspath("../testdata/config/02_import_json/import_file_utf8_format_02.json") + oJsonPreprocessor = CJsonPreprocessor(syntax="python") + oJsonData = oJsonPreprocessor.jsonLoad(sJsonfile) + assert oJsonData['German'] == "Dies ist der UTF-8 SälfTest" + assert oJsonData['Vietnamese'] == "Đây là bản tự kiểm tra UTF-8" + assert oJsonData['Japanese'] == "これは UTF-8 セルフテストです" + assert oJsonData['Hindi'] == "यह UTF-8 सेल्फ़टेस्ट है" + assert oJsonData['Thai'] == "นี่คือการทดสอบตัวเอง UTF-8" + assert oJsonData['Korean'] == "이것은 UTF-8 자체 테스트입니다" + assert oJsonData['Chinese'] == "這是 UTF-8 自測" + + def test_utf8_encoding_imported_03(self): + ''' + Test utf-8 encoding file is imported and overried by utf8 values to other json config file + ''' + sJsonfile = os.path.abspath("../testdata/config/02_import_json/import_file_utf8_format_03.json") + oJsonPreprocessor = CJsonPreprocessor(syntax="python") + oJsonData = oJsonPreprocessor.jsonLoad(sJsonfile) + assert oJsonData['German'] == "Dies ist der UTF-8 SälfTest" + assert oJsonData['Vietnamese'] == "Đây là bản tự kiểm tra UTF-8" + assert oJsonData['Japanese'] == "これは UTF-8 セルフテストです" + assert oJsonData['Hindi'] == "यह UTF-8 सेल्फ़टेस्ट है" + assert oJsonData['Thai'] == "นี่คือการทดสอบตัวเอง UTF-8" + assert oJsonData['Korean'] == "이것은 UTF-8 자체 테스트입니다" + assert oJsonData['Chinese'] == "這是 UTF-8 自測" + + def test_utf8_encoding_imported_04(self): + ''' + Test utf-8 encoding - Override utf8 data by normal data + ''' + sJsonfile = os.path.abspath("../testdata/config/02_import_json/import_file_utf8_format_04.json") + oJsonPreprocessor = CJsonPreprocessor(syntax="python") + oJsonData = oJsonPreprocessor.jsonLoad(sJsonfile) + assert oJsonData['German'] == "This is German" + assert oJsonData['Vietnamese'] == 84 + assert oJsonData['Japanese'] == "Đây là tiếng Nhật" + assert oJsonData['Hindi'] == True + assert oJsonData['Thai'] == False + assert oJsonData['Korean'] == [1, 2, "List", 4, 5] + assert oJsonData['Chinese'] == None + + def test_utf8_encoding_imported_05(self): + ''' + Test utf-8 encoding - import normal json configuration file into utf8 file. + ''' + sJsonfile = os.path.abspath("../testdata/config/08_utf8_encoding/utf8_format_01.json") + oJsonPreprocessor = CJsonPreprocessor(syntax="python") + oJsonData = oJsonPreprocessor.jsonLoad(sJsonfile) + assert oJsonData['German'] == "Dies ist der UTF-8 SälfTest" + assert oJsonData['Vietnamese'] == "Đây là bản tự kiểm tra UTF-8" + assert oJsonData['Japanese'] == "これは UTF-8 セルフテストです" + assert oJsonData['Hindi'] == "यह UTF-8 सेल्फ़टेस्ट है" + assert oJsonData['Thai'] == "นี่คือการทดสอบตัวเอง UTF-8" + assert oJsonData['Korean'] == "이것은 UTF-8 자체 테스트입니다" + assert oJsonData['Chinese'] == "這是 UTF-8 自測" + assert oJsonData['gPreprolIntParam'] == 1 + assert oJsonData['gPreproFloatParam'] == 1.332 + assert oJsonData['gPreproString'] == "This is a string" + assert oJsonData['gPreproStructure']['general'] == "general" + + def test_utf8_encoding_imported_06(self): + ''' + Test utf-8 encoding - Override parameters have utf8 format in keys. + ''' + sJsonfile = os.path.abspath("../testdata/config/08_utf8_encoding/utf8_format_03.json") + oJsonPreprocessor = CJsonPreprocessor(syntax="python") + oJsonData = oJsonPreprocessor.jsonLoad(sJsonfile) + assert oJsonData['utf8']['Tiếng Đức'] == "This is German" + assert oJsonData['utf8']['Tiếng Việt'] == 84 + assert oJsonData['utf8']['日本'] == 1.987 + assert oJsonData['utf8']['हिंदी'] == "นี่คือการทดสอบตัวเอง UTF-8" + assert oJsonData['utf8']['한국인'] == "1" diff --git a/atest/run.bat b/atest/run.bat index b343d1cf..88d7f8c5 100644 --- a/atest/run.bat +++ b/atest/run.bat @@ -16,7 +16,7 @@ @ECHO OFF set current_dir=%CD% cd %~dp0\jsonpreprocessor -"%RobotPythonPath%"\python -m pytest jsonpreprocessor_unittest.py --junit-xml=..\logs\windows_jsonpreprocessor_unittest.xml && ( +"%RobotPythonPath%"\python -m pytest test_jsonpreprocessor.py --junit-xml=..\logs\windows_test_jsonpreprocessor.xml && ( echo Run JsonPreprocessor acceptance test sussessful! ) || ( echo Run JsonPreprocessor acceptance test failed! diff --git a/atest/run.sh b/atest/run.sh index 9bb6b21e..37ad3ebb 100644 --- a/atest/run.sh +++ b/atest/run.sh @@ -20,7 +20,7 @@ atest_dir=`dirname $bash_file_path` cd $atest_dir/jsonpreprocessor export PYTHONPATH="$atest_dir/../" echo $PYTHONPATH - $RobotPythonPath/python3 -m pytest jsonpreprocessor_unittest.py --junit-xml=../logs/linux_jsonpreprocessor_unittest.xml && ( + $RobotPythonPath/python3 -m pytest test_jsonpreprocessor.py --junit-xml=../logs/linux_test_jsonpreprocessor.xml && ( echo "Run JsonPreprocessor acceptance test successful!" ) || ( echo "Run JsonPreprocessor acceptance test failed!" diff --git a/atest/testdata/config/02_import_json/import_file_utf8_format_01.json b/atest/testdata/config/02_import_json/import_file_utf8_format_01.json new file mode 100644 index 00000000..ddf84ef7 --- /dev/null +++ b/atest/testdata/config/02_import_json/import_file_utf8_format_01.json @@ -0,0 +1,27 @@ +// Copyright 2020-2022 Robert Bosch Car Multimedia 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. +//***************************************************************************** + +{ + "Project": "JsonPreprocessor", + "WelcomeString": "Hello... JsonPreprocessor selftest is running now!", + "[import]": "../import/utf8_format_data.json", + // Version control information. + "version": { + "majorversion": "0", + "minorversion": "1", + "patchversion": "1" + }, + "TargetName" : "Device@01" +} \ No newline at end of file diff --git a/atest/testdata/config/02_import_json/import_file_utf8_format_02.json b/atest/testdata/config/02_import_json/import_file_utf8_format_02.json new file mode 100644 index 00000000..470ce24d --- /dev/null +++ b/atest/testdata/config/02_import_json/import_file_utf8_format_02.json @@ -0,0 +1,30 @@ +// Copyright 2020-2022 Robert Bosch Car Multimedia 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. +//***************************************************************************** + +{ + "Project": "JsonPreprocessor", + "WelcomeString": "Hello... JsonPreprocessor selftest is running now!", + "German": "Dies ist der UTF-8 SälfTest", + "Vietnamese": "Đây là bản tự kiểm tra UTF-8", + "Japanese": "これは UTF-8 セルフテストです", + "[import]": "../import/utf8_format_data_01.json", + // Version control information. + "version": { + "majorversion": "0", + "minorversion": "1", + "patchversion": "1" + }, + "TargetName" : "Device@01" +} \ No newline at end of file diff --git a/atest/testdata/config/02_import_json/import_file_utf8_format_03.json b/atest/testdata/config/02_import_json/import_file_utf8_format_03.json new file mode 100644 index 00000000..224497fb --- /dev/null +++ b/atest/testdata/config/02_import_json/import_file_utf8_format_03.json @@ -0,0 +1,30 @@ +// Copyright 2020-2022 Robert Bosch Car Multimedia 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. +//***************************************************************************** + +{ + "Project": "JsonPreprocessor", + "WelcomeString": "Hello... JsonPreprocessor selftest is running now!", + "German": "Will be overridden by German", + "Vietnamese": "Sẽ được ghi đè bằng câu tiếng Việt khác", + "Japanese": "Будет переопределен японским", + "[import]": "../import/utf8_format_data.json", + // Version control information. + "version": { + "majorversion": "0", + "minorversion": "1", + "patchversion": "1" + }, + "TargetName" : "Device@01" +} \ No newline at end of file diff --git a/atest/testdata/config/02_import_json/import_file_utf8_format_04.json b/atest/testdata/config/02_import_json/import_file_utf8_format_04.json new file mode 100644 index 00000000..1d684084 --- /dev/null +++ b/atest/testdata/config/02_import_json/import_file_utf8_format_04.json @@ -0,0 +1,33 @@ +// Copyright 2020-2022 Robert Bosch Car Multimedia 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. +//***************************************************************************** + +{ + "Project": "JsonPreprocessor", + "German": "Dies ist der UTF-8 SälfTest", + "Vietnamese": "Đây là bản tự kiểm tra UTF-8", + "Japanese": "これは UTF-8 セルフテストです", + "Hindi": "यह UTF-8 सेल्फ़टेस्ट है", + "Thai": "นี่คือการทดสอบตัวเอง UTF-8", + "Korean": "이것은 UTF-8 자체 테스트입니다", + "Chinese": "這是 UTF-8 自測", + // Version control information. + "version": { + "majorversion": "0", + "minorversion": "1", + "patchversion": "1" + }, + "TargetName" : "Device@01", + "[import]": "../import/utf8_format_data_02.json" + } \ No newline at end of file diff --git a/atest/testdata/config/08_utf8_encoding/utf8_format.json b/atest/testdata/config/08_utf8_encoding/utf8_format.json new file mode 100644 index 00000000..acdc5835 --- /dev/null +++ b/atest/testdata/config/08_utf8_encoding/utf8_format.json @@ -0,0 +1,32 @@ +// Copyright 2020-2022 Robert Bosch Car Multimedia 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. +//***************************************************************************** + +{ + "Project": "JsonPreprocessor", + "German": "Dies ist der UTF-8 SälfTest", + "Vietnamese": "Đây là bản tự kiểm tra UTF-8", + "Japanese": "これは UTF-8 セルフテストです", + "Hindi": "यह UTF-8 सेल्फ़टेस्ट है", + "Thai": "นี่คือการทดสอบตัวเอง UTF-8", + "Korean": "이것은 UTF-8 자체 테스트입니다", + "Chinese": "這是 UTF-8 自測", + // Version control information. + "version": { + "majorversion": "0", + "minorversion": "1", + "patchversion": "1" + }, + "TargetName" : "Device@01" + } \ No newline at end of file diff --git a/atest/testdata/config/08_utf8_encoding/utf8_format_01.json b/atest/testdata/config/08_utf8_encoding/utf8_format_01.json new file mode 100644 index 00000000..7e538e48 --- /dev/null +++ b/atest/testdata/config/08_utf8_encoding/utf8_format_01.json @@ -0,0 +1,33 @@ +// Copyright 2020-2022 Robert Bosch Car Multimedia 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. +//***************************************************************************** + +{ + "Project": "JsonPreprocessor", + "German": "Dies ist der UTF-8 SälfTest", + "Vietnamese": "Đây là bản tự kiểm tra UTF-8", + "Japanese": "これは UTF-8 セルフテストです", + "Hindi": "यह UTF-8 सेल्फ़टेस्ट है", + "Thai": "นี่คือการทดสอบตัวเอง UTF-8", + "Korean": "이것은 UTF-8 자체 테스트입니다", + "Chinese": "這是 UTF-8 自測", + "[import]" : "../import/imported_file01_config.json", + // Version control information. + "version": { + "majorversion": "0", + "minorversion": "1", + "patchversion": "1" + }, + "TargetName" : "Device@01" + } \ No newline at end of file diff --git a/atest/testdata/config/08_utf8_encoding/utf8_format_02.json b/atest/testdata/config/08_utf8_encoding/utf8_format_02.json new file mode 100644 index 00000000..59fa330d --- /dev/null +++ b/atest/testdata/config/08_utf8_encoding/utf8_format_02.json @@ -0,0 +1,32 @@ +// Copyright 2020-2022 Robert Bosch Car Multimedia 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. +//***************************************************************************** + +{ + "Project": "JsonPreprocessor", + "Tiếng Đức": "Dies ist der UTF-8 SälfTest", + "Tiếng Việt": "Đây là bản tự kiểm tra UTF-8", + "日本": "これは UTF-8 セルフテストです", + "हिंदी": "यह UTF-8 सेल्फ़टेस्ट है", + "แบบไทย": "นี่คือการทดสอบตัวเอง UTF-8", + "한국인": "이것은 UTF-8 자체 테스트입니다", + "中國人": "這是 UTF-8 自測", + // Version control information. + "version": { + "majorversion": "0", + "minorversion": "1", + "patchversion": "1" + }, + "TargetName" : "Device@01" + } \ No newline at end of file diff --git a/atest/testdata/config/08_utf8_encoding/utf8_format_03.json b/atest/testdata/config/08_utf8_encoding/utf8_format_03.json new file mode 100644 index 00000000..3d38e616 --- /dev/null +++ b/atest/testdata/config/08_utf8_encoding/utf8_format_03.json @@ -0,0 +1,35 @@ +// Copyright 2020-2022 Robert Bosch Car Multimedia 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. +//***************************************************************************** + +{ + "Project": "JsonPreprocessor", + "utf8": { + "Tiếng Đức": "Dies ist der UTF-8 SälfTest", + "Tiếng Việt": "Đây là bản tự kiểm tra UTF-8", + "日本": "これは UTF-8 セルフテストです", + "हिंदी": "यह UTF-8 सेल्फ़टेस्ट है", + "แบบไทย": "นี่คือการทดสอบตัวเอง UTF-8", + "한국인": "이것은 UTF-8 자체 테스트입니다", + "中國人": "這是 UTF-8 自測" + }, + // Version control information. + "version": { + "majorversion": "0", + "minorversion": "1", + "patchversion": "1" + }, + "TargetName" : "Device@01", + "[import]": "../import/utf8_format_data_03.json" + } \ No newline at end of file diff --git a/atest/testdata/config/import/utf8_format_data.json b/atest/testdata/config/import/utf8_format_data.json new file mode 100644 index 00000000..240b1bd5 --- /dev/null +++ b/atest/testdata/config/import/utf8_format_data.json @@ -0,0 +1,23 @@ +// Copyright 2020-2022 Robert Bosch Car Multimedia 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. + +{ + "German": "Dies ist der UTF-8 SälfTest", + "Vietnamese": "Đây là bản tự kiểm tra UTF-8", + "Japanese": "これは UTF-8 セルフテストです", + "Hindi": "यह UTF-8 सेल्फ़टेस्ट है", + "Thai": "นี่คือการทดสอบตัวเอง UTF-8", + "Korean": "이것은 UTF-8 자체 테스트입니다", + "Chinese": "這是 UTF-8 自測" +} \ No newline at end of file diff --git a/atest/testdata/config/import/utf8_format_data_01.json b/atest/testdata/config/import/utf8_format_data_01.json new file mode 100644 index 00000000..21e42f04 --- /dev/null +++ b/atest/testdata/config/import/utf8_format_data_01.json @@ -0,0 +1,20 @@ +// Copyright 2020-2022 Robert Bosch Car Multimedia 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. + +{ + "Hindi": "यह UTF-8 सेल्फ़टेस्ट है", + "Thai": "นี่คือการทดสอบตัวเอง UTF-8", + "Korean": "이것은 UTF-8 자체 테스트입니다", + "Chinese": "這是 UTF-8 自測" +} \ No newline at end of file diff --git a/atest/testdata/config/import/utf8_format_data_02.json b/atest/testdata/config/import/utf8_format_data_02.json new file mode 100644 index 00000000..28a95c47 --- /dev/null +++ b/atest/testdata/config/import/utf8_format_data_02.json @@ -0,0 +1,23 @@ +// Copyright 2020-2022 Robert Bosch Car Multimedia 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. + +{ + "German": "This is German", + "Vietnamese": 84, + "Japanese": "Đây là tiếng Nhật", + "Hindi": True, + "Thai": False, + "Korean": [1, 2, "List", 4, 5], + "Chinese": None +} \ No newline at end of file diff --git a/atest/testdata/config/import/utf8_format_data_03.json b/atest/testdata/config/import/utf8_format_data_03.json new file mode 100644 index 00000000..7080e725 --- /dev/null +++ b/atest/testdata/config/import/utf8_format_data_03.json @@ -0,0 +1,21 @@ +// Copyright 2020-2022 Robert Bosch Car Multimedia 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. + +{ + ${utf8}['Tiếng Đức']: "This is German", + ${utf8}['Tiếng Việt']: 84, + ${utf8}['日本']: 1.987, + ${utf8}['हिंदी']: "${utf8}['แบบไทย']", + ${utf8}['한국인']: "${version}['patchversion']" +}