Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
291d23ee
X
Xts Acts
项目概览
OpenHarmony
/
Xts Acts
1 年多 前同步成功
通知
9
Star
22
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
X
Xts Acts
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
291d23ee
编写于
3月 06, 2023
作者:
Y
y00314596
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add by yangqing3@huawei.com
Signed-off-by:
N
y00314596
<
yangqing3@huawei.com
>
上级
1f4e0e7b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
112 addition
and
0 deletion
+112
-0
global/i18n_standard/intljs/src/main/js/test/I18n.test.js
global/i18n_standard/intljs/src/main/js/test/I18n.test.js
+112
-0
未找到文件。
global/i18n_standard/intljs/src/main/js/test/I18n.test.js
浏览文件 @
291d23ee
...
...
@@ -2180,5 +2180,117 @@ describe('I18nTest', function () {
expect
(
value
).
assertEqual
(
'
U_SPACE_SEPARATOR
'
);
})
/**
* @tc.number SUB_GLOBAL_I18N_NORMALIZE_JS_0100
* @tc.name normalize the '1e9b 0323' in NFC mode
* @tc.desc get the NFC mode value
*/
it
(
'
i18n_normalizer_test_0100
'
,
0
,
function
()
{
console
.
log
(
'
i18n_normalizer_test_0100
'
+
'
start
'
);
let
str
=
'
\
u1e9b
\
u0323
'
;
let
normal
=
I18n
.
Normalizer
.
getInstance
(
I18n
.
NormalizerMode
.
NFC
);
let
value
=
normal
.
normalize
(
str
);
console
.
log
(
'
i18n_normalizer_test_0100
'
+
value
);
expect
(
value
).
assertEqual
(
'
\
u1e9b
\
u0323
'
);
})
/**
* @tc.number SUB_GLOBAL_I18N_NORMALIZE_JS_0200
* @tc.name normalize the '1e9b 0323' in NFD mode
* @tc.desc get the NFD mode value
*/
it
(
'
i18n_normalizer_test_0200
'
,
0
,
function
()
{
console
.
log
(
'
i18n_normalizer_test_0200
'
+
'
start
'
);
let
str
=
'
\
u1e9b
\
u0323
'
;
let
normal
=
I18n
.
Normalizer
.
getInstance
(
I18n
.
NormalizerMode
.
NFD
);
let
value
=
normal
.
normalize
(
str
);
console
.
log
(
'
i18n_normalizer_test_0200
'
+
value
);
expect
(
value
).
assertEqual
(
'
\
u017f
\
u0323
\
u0307
'
);
})
/**
* @tc.number SUB_GLOBAL_I18N_NORMALIZE_JS_0300
* @tc.name normalize the '1e9b 0323' in NFKC mode
* @tc.desc get the NFKC mode value
*/
it
(
'
i18n_normalizer_test_0300
'
,
0
,
function
()
{
console
.
log
(
'
i18n_normalizer_test_0300
'
+
'
start
'
);
let
str
=
'
\
u1e9b
\
u0323
'
;
let
normal
=
I18n
.
Normalizer
.
getInstance
(
I18n
.
NormalizerMode
.
NFKC
);
let
value
=
normal
.
normalize
(
str
);
console
.
log
(
'
i18n_normalizer_test_0300
'
+
value
);
expect
(
value
).
assertEqual
(
'
\
u1e69
'
);
})
/**
* @tc.number SUB_GLOBAL_I18N_NORMALIZE_JS_0400
* @tc.name normalize the '1e9b 0323' in NFKD mode
* @tc.desc get the NFKD mode value
*/
it
(
'
i18n_normalizer_test_0400
'
,
0
,
function
()
{
console
.
log
(
'
i18n_normalizer_test_0400
'
+
'
start
'
);
let
str
=
'
\
u1e9b
\
u0323
'
;
let
normal
=
I18n
.
Normalizer
.
getInstance
(
I18n
.
NormalizerMode
.
NFKD
);
let
value
=
normal
.
normalize
(
str
);
console
.
log
(
'
i18n_normalizer_test_0400
'
+
value
);
expect
(
value
).
assertEqual
(
'
\
u0073
\
u0323
\
u0307
'
);
})
/**
* @tc.number SUB_GLOBAL_I18N_NORMALIZE_JS_0500
* @tc.name normalize the '0032 2075' in NFC mode
* @tc.desc get the NFC mode value
*/
it
(
'
i18n_normalizer_test_0500
'
,
0
,
function
()
{
console
.
log
(
'
i18n_normalizer_test_0500
'
+
'
start
'
);
let
str
=
'
\
u0032
\
u2075
'
;
let
normal
=
I18n
.
Normalizer
.
getInstance
(
I18n
.
NormalizerMode
.
NFC
);
let
value
=
normal
.
normalize
(
str
);
console
.
log
(
'
i18n_normalizer_test_0500
'
+
value
);
expect
(
value
).
assertEqual
(
'
\
u0032
\
u2075
'
);
})
/**
* @tc.number SUB_GLOBAL_I18N_NORMALIZE_JS_0600
* @tc.name normalize the '0032 2075' in NFD mode
* @tc.desc get the NFD mode value
*/
it
(
'
i18n_normalizer_test_0600
'
,
0
,
function
()
{
console
.
log
(
'
i18n_normalizer_test_0600
'
+
'
start
'
);
let
str
=
'
\
u0032
\
u2075
'
;
let
normal
=
I18n
.
Normalizer
.
getInstance
(
I18n
.
NormalizerMode
.
NFD
);
let
value
=
normal
.
normalize
(
str
);
console
.
log
(
'
i18n_normalizer_test_0600
'
+
value
);
expect
(
value
).
assertEqual
(
'
\
u0032
\
u2075
'
);
})
/**
* @tc.number SUB_GLOBAL_I18N_NORMALIZE_JS_0700
* @tc.name normalize the '0032 2075' in NFKC mode
* @tc.desc get the NFKC mode value
*/
it
(
'
i18n_normalizer_test_0700
'
,
0
,
function
()
{
console
.
log
(
'
i18n_normalizer_test_0700
'
+
'
start
'
);
let
str
=
'
\
u0032
\
u2075
'
;
let
normal
=
I18n
.
Normalizer
.
getInstance
(
I18n
.
NormalizerMode
.
NFKC
);
let
value
=
normal
.
normalize
(
str
);
console
.
log
(
'
i18n_normalizer_test_0700
'
+
value
);
expect
(
value
).
assertEqual
(
'
\
u0032
\
u0035
'
);
})
/**
* @tc.number SUB_GLOBAL_I18N_NORMALIZE_JS_0800
* @tc.name normalize the '0032 2075' in NFKD mode
* @tc.desc get the NFKD mode value
*/
it
(
'
i18n_normalizer_test_0800
'
,
0
,
function
()
{
console
.
log
(
'
i18n_normalizer_test_0800
'
+
'
start
'
);
let
str
=
'
\
u0032
\
u2075
'
;
let
normal
=
I18n
.
Normalizer
.
getInstance
(
I18n
.
NormalizerMode
.
NFKD
);
let
value
=
normal
.
normalize
(
str
);
console
.
log
(
'
i18n_normalizer_test_0800
'
+
value
);
expect
(
value
).
assertEqual
(
'
\
u0032
\
u0035
'
);
})
console
.
log
(
'
*************end I18NTest*************
'
);
})}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录