Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
81491833
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看板
提交
81491833
编写于
9月 15, 2021
作者:
J
jiyong
1
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
jiyong@huawei.com
Signed-off-by:
N
jiyong
<
jiyong@huawei.com
>
上级
1f0a6d8b
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
0 addition
and
81 deletion
+0
-81
utils_lite/file_hal/src/utils_file_func_test.c
utils_lite/file_hal/src/utils_file_func_test.c
+0
-81
未找到文件。
utils_lite/file_hal/src/utils_file_func_test.c
浏览文件 @
81491833
...
@@ -334,20 +334,6 @@ LITE_TEST_CASE(UtilsFileFuncTestSuite, testCreatLongNameFile, Function | MediumT
...
@@ -334,20 +334,6 @@ LITE_TEST_CASE(UtilsFileFuncTestSuite, testCreatLongNameFile, Function | MediumT
UtilsFileDelete
(
fileName
);
UtilsFileDelete
(
fileName
);
};
};
/**
* @tc.number : SUB_UTILS_FILE_OPERATION_1700
* @tc.name : Creat file with special characters
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
UtilsFileFuncTestSuite
,
testCreatFileWithSpecChar
,
Function
|
MediumTest
|
Level1
)
{
char
*
fileName
=
"case117-~!@#$%^&*()+_/:?<;>|
\\
"
;
int
fd
=
UtilsFileOpen
(
fileName
,
O_RDONLY_FS
|
O_CREAT_FS
,
0
);
TEST_ASSERT_GREATER_THAN_INT
(
0
,
fd
);
UtilsFileClose
(
fd
);
UtilsFileDelete
(
fileName
);
};
/**
/**
* @tc.number : SUB_UTILS_FILE_OPERATION_1800
* @tc.number : SUB_UTILS_FILE_OPERATION_1800
* @tc.name : Open none exist file
* @tc.name : Open none exist file
...
@@ -692,23 +678,6 @@ LITE_TEST_CASE(UtilsFileFuncTestSuite, testObtainLongNameFileSize, Function | Me
...
@@ -692,23 +678,6 @@ LITE_TEST_CASE(UtilsFileFuncTestSuite, testObtainLongNameFileSize, Function | Me
UtilsFileDelete
(
fileName
);
UtilsFileDelete
(
fileName
);
};
};
/**
* @tc.number : SUB_UTILS_FILE_OPERATION_3900
* @tc.name : Obtaining size for file with special characters
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
UtilsFileFuncTestSuite
,
testObtainSizeForFileWithSpecChar
,
Function
|
MediumTest
|
Level1
)
{
char
*
fileName
=
"case307-~!@#$%^&*()+_/:?<;>|
\\
"
;
int
fd0
=
UtilsFileOpen
(
fileName
,
O_RDWR_FS
|
O_CREAT_FS
,
0
);
UtilsFileWrite
(
fd0
,
g_def
,
strlen
(
g_def
));
UtilsFileClose
(
fd0
);
unsigned
int
fileLen
=
0
;
int
ret
=
UtilsFileStat
(
fileName
,
&
fileLen
);
TEST_ASSERT_EQUAL_INT
(
0
,
ret
);
UtilsFileDelete
(
fileName
);
};
/**
/**
* @tc.number : SUB_UTILS_FILE_OPERATION_4000
* @tc.number : SUB_UTILS_FILE_OPERATION_4000
* @tc.name : File operation for file copy
* @tc.name : File operation for file copy
...
@@ -758,24 +727,6 @@ LITE_TEST_CASE(UtilsFileFuncTestSuite, testCopyLongNameFile, Function | MediumTe
...
@@ -758,24 +727,6 @@ LITE_TEST_CASE(UtilsFileFuncTestSuite, testCopyLongNameFile, Function | MediumTe
UtilsFileDelete
(
fileNameCopy
);
UtilsFileDelete
(
fileNameCopy
);
};
};
/**
* @tc.number : SUB_UTILS_FILE_OPERATION_4300
* @tc.name : Copy file with special characters
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
UtilsFileFuncTestSuite
,
testCopyFileWithSpecChar
,
Function
|
MediumTest
|
Level1
)
{
char
*
fileName
=
"case404-~!@#$%^&*()+_/:?<;>|
\\
"
;
int
fd0
=
UtilsFileOpen
(
fileName
,
O_RDWR_FS
|
O_CREAT_FS
,
0
);
UtilsFileWrite
(
fd0
,
g_def
,
strlen
(
g_def
));
UtilsFileClose
(
fd0
);
char
*
fileNameCopy
=
"copy404-~!@#$%^&*()+_/:?<;>|
\\
"
;
int
ret
=
UtilsFileCopy
(
fileName
,
fileNameCopy
);
TEST_ASSERT_EQUAL_INT
(
0
,
ret
);
UtilsFileDelete
(
fileName
);
UtilsFileDelete
(
fileNameCopy
);
};
/**
/**
* @tc.number : SUB_UTILS_FILE_OPERATION_4400
* @tc.number : SUB_UTILS_FILE_OPERATION_4400
* @tc.name : File operation for file move
* @tc.name : File operation for file move
...
@@ -823,23 +774,6 @@ LITE_TEST_CASE(UtilsFileFuncTestSuite, testMoveLongNameFile, Function | MediumTe
...
@@ -823,23 +774,6 @@ LITE_TEST_CASE(UtilsFileFuncTestSuite, testMoveLongNameFile, Function | MediumTe
UtilsFileDelete
(
fileNameMove
);
UtilsFileDelete
(
fileNameMove
);
};
};
/**
* @tc.number : SUB_UTILS_FILE_OPERATION_4700
* @tc.name : Move file with special characters
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
UtilsFileFuncTestSuite
,
testMoveFileWithSpecChar
,
Function
|
MediumTest
|
Level1
)
{
char
*
fileName
=
"case504-~!@#$%^&*()+_/:?<;>|
\\
"
;
int
fd0
=
UtilsFileOpen
(
fileName
,
O_RDWR_FS
|
O_CREAT_FS
,
0
);
UtilsFileWrite
(
fd0
,
g_def
,
strlen
(
g_def
));
UtilsFileClose
(
fd0
);
char
*
fileNameMove
=
"move504-~!@#$%^&*()+_/:?<;>|
\\
"
;
int
ret
=
UtilsFileMove
(
fileName
,
fileNameMove
);
TEST_ASSERT_EQUAL_INT
(
0
,
ret
);
UtilsFileDelete
(
fileNameMove
);
};
/**
/**
* @tc.number : SUB_UTILS_FILE_OPERATION_4800
* @tc.number : SUB_UTILS_FILE_OPERATION_4800
* @tc.name : File operation for file delete
* @tc.name : File operation for file delete
...
@@ -882,19 +816,4 @@ LITE_TEST_CASE(UtilsFileFuncTestSuite, testDeleteLongNameFile, Function | Medium
...
@@ -882,19 +816,4 @@ LITE_TEST_CASE(UtilsFileFuncTestSuite, testDeleteLongNameFile, Function | Medium
TEST_ASSERT_EQUAL_INT
(
0
,
ret
);
TEST_ASSERT_EQUAL_INT
(
0
,
ret
);
};
};
/**
* @tc.number : SUB_UTILS_FILE_OPERATION_5100
* @tc.name : Delete file with special characters
* @tc.desc : [C- SOFTWARE -0200]
*/
LITE_TEST_CASE
(
UtilsFileFuncTestSuite
,
testDeleteFileWithSpecChar
,
Function
|
MediumTest
|
Level1
)
{
char
*
fileName
=
"delete604-~!@#$%^&*()+_/:?<;>|
\\
"
;
int
fd0
=
UtilsFileOpen
(
fileName
,
O_RDWR_FS
|
O_CREAT_FS
,
0
);
UtilsFileWrite
(
fd0
,
g_def
,
strlen
(
g_def
));
UtilsFileClose
(
fd0
);
int
ret
=
UtilsFileDelete
(
fileName
);
TEST_ASSERT_EQUAL_INT
(
0
,
ret
);
};
RUN_TEST_SUITE
(
UtilsFileFuncTestSuite
);
RUN_TEST_SUITE
(
UtilsFileFuncTestSuite
);
鸿蒙社区
@harmonycommunity
mentioned in commit
f7c519dd
·
9月 18, 2021
mentioned in commit
f7c519dd
mentioned in commit f7c519dd95c4bc2f950d8fe5ed8e713b95ae2554
开关提交列表
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录