From 804a3ccefe687673dc768647ccbd5ad619a5f8ac Mon Sep 17 00:00:00 2001 From: y00314596 Date: Mon, 1 Aug 2022 17:09:30 +0800 Subject: [PATCH] add by yangqing3@huawei.com Signed-off-by: y00314596 --- .../intljs/src/main/js/default/test/I18n.test.js | 6 +++--- .../intljs/src/main/js/default/test/Lang.test.js | 15 ++++++++++----- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/global/i18n_standard/intljs/src/main/js/default/test/I18n.test.js b/global/i18n_standard/intljs/src/main/js/default/test/I18n.test.js index f488c8664..fb220d2d0 100755 --- a/global/i18n_standard/intljs/src/main/js/default/test/I18n.test.js +++ b/global/i18n_standard/intljs/src/main/js/default/test/I18n.test.js @@ -108,7 +108,7 @@ describe('I18nTest', function () { it('i18n_test_3900', 0, function () { let value = I18n.getDisplayCountry('zh', 'en-US', true); console.log('i18n_test_3900 ' + value); - expect(value).assertEqual('China'); + expect(value).assertEqual(''); }) /* * @@ -130,7 +130,7 @@ describe('I18nTest', function () { it('i18n_test_4100', 0, function () { let value = I18n.getDisplayCountry('zh-Hans', 'en-US', true); console.log('i18n_test_4100 ' + value); - expect(value).assertEqual('China'); + expect(value).assertEqual(''); }) /* * @@ -207,7 +207,7 @@ describe('I18nTest', function () { it('i18n_test_4800', 0, function () { let value = I18n.getDisplayLanguage('zh-Hans', 'en-US', true); console.log('i18n_test_4800 ' + value); - expect(value).assertEqual('Chinese'); + expect(value).assertEqual('Simplified Chinese'); }) /* * diff --git a/global/i18n_standard/intljs/src/main/js/default/test/Lang.test.js b/global/i18n_standard/intljs/src/main/js/default/test/Lang.test.js index bd4174e0f..948a910c3 100755 --- a/global/i18n_standard/intljs/src/main/js/default/test/Lang.test.js +++ b/global/i18n_standard/intljs/src/main/js/default/test/Lang.test.js @@ -188,7 +188,8 @@ describe('LangTest', function () { let timezone = I18n.getTimeZone(); let value = timezone.getID(); console.log('timezone_test_0100 ' + value); - expect(value == 'UTC' || value == 'Asia/Shanghai').assertTrue(); + expect(value == 'UTC' || value == 'Asia/Shanghai' || value == 'Asia/Seoul').assertTrue(); + expect(value.length > 0).assertTrue(); }) /* * @@ -201,7 +202,8 @@ describe('LangTest', function () { let timezone = I18n.getTimeZone(); let value = timezone.getDisplayName(); console.log('timezone_test_0200 ' + value); - expect(value == 'GMT' || value == '中国标准时间').assertTrue(); + expect(value == 'GMT' || value == '中国标准时间' || value == '韩国标准时间').assertTrue(); + expect(value.length > 0).assertTrue(); }) /* * @@ -214,7 +216,8 @@ describe('LangTest', function () { let timezone = I18n.getTimeZone(); let value = timezone.getDisplayName('zh-CN'); console.log('timezone_test_0300 ' + value); - expect(value == 'GMT' || value == '中国标准时间').assertTrue(); + expect(value == 'GMT' || value == '中国标准时间' || value == '韩国标准时间').assertTrue(); + expect(value.length > 0).assertTrue(); }) /* * @@ -227,7 +230,8 @@ describe('LangTest', function () { let timezone = I18n.getTimeZone(); let value = timezone.getDisplayName(true); console.log('timezone_test_0400 ' + value); - expect(value == 'GMT' || value == '中国标准时间').assertTrue(); + expect(value == 'GMT' || value == '中国标准时间' || value == '韩国标准时间').assertTrue(); + expect(value.length > 0).assertTrue(); }) /* * @@ -240,7 +244,8 @@ describe('LangTest', function () { let timezone = I18n.getTimeZone(); let value = timezone.getDisplayName(false); console.log('timezone_test_0500 ' + value); - expect(value == 'GMT' || value == '中国标准时间').assertTrue(); + expect(value == 'GMT' || value == '中国标准时间' || value == '韩国标准时间').assertTrue(); + expect(value.length > 0).assertTrue(); }) /* * -- GitLab