Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
7d1d8aa2
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看板
提交
7d1d8aa2
编写于
6月 15, 2022
作者:
Z
zhangxingxia
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update fileio xts
Signed-off-by:
N
zhangxingxia
<
zhangxingxia1@huawei.com
>
上级
bd1fabfe
变更
2
展开全部
隐藏空白更改
内联
并排
Showing
2 changed file
with
205 addition
and
572 deletion
+205
-572
storage/storagefileiojstest/src/main/js/default/test/module_fileio/class_dir/close.test.js
...ain/js/default/test/module_fileio/class_dir/close.test.js
+38
-12
storage/storagefileiojstest/src/main/js/default/test/module_fileio/class_dir/read.test.js
...main/js/default/test/module_fileio/class_dir/read.test.js
+167
-560
未找到文件。
storage/storagefileiojstest/src/main/js/default/test/module_fileio/class_dir/close.test.js
浏览文件 @
7d1d8aa2
...
...
@@ -15,24 +15,19 @@
import
{
fileio
,
FILE_CONTENT
,
prepareFile
,
nextFileName
,
isIntNum
,
isString
,
isBoolean
,
describe
,
it
,
expect
,
}
from
'
../../Common
'
;
describe
(
'
fileio_dir_close
_read
'
,
function
()
{
describe
(
'
fileio_dir_close
'
,
function
()
{
/**
* @tc.number SUB_DF_FILEIO_DIR_CLOSE_ASYNC_0000
* @tc.name fileio_test_dir_close_async_000
* @tc.desc Test Dir
.closeAsync() interfac
e.
* @tc.size MEDIUM
(中型)
* @tc.desc Test Dir
close() interface,return in promise mod
e.
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 0
* @tc.require
...
...
@@ -48,15 +43,19 @@ describe('fileio_dir_close_read', function () {
expect
(
fileio
.
rmdirSync
(
dpath
)
==
null
).
assertTrue
();
done
();
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_dir_close_async_000 has failed for
'
+
e
);
console
.
info
(
'
fileio_test_dir_close_async_000 has failed for
'
+
e
);
expect
(
null
).
assertFail
();
}
});
/**
* @tc.number SUB_DF_FileIO_Dir_close_Async_0
001
* @tc.number SUB_DF_FileIO_Dir_close_Async_0
100
* @tc.name fileio_test_dir_close_async_001
* @tc.desc Test Dir.closeAsync() interface.
* @tc.desc Test Dir close() interface,return in callback mode.
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 0
* @tc.require
*/
it
(
'
fileio_test_dir_close_async_001
'
,
0
,
async
function
(
done
)
{
let
dpath
=
await
nextFileName
(
'
fileio_test_dir_close_async_001
'
)
+
'
d
'
;
...
...
@@ -70,8 +69,35 @@ describe('fileio_dir_close_read', function () {
done
();
});
}
catch
(
e
)
{
console
.
log
(
'
fileio_test_dir_close_async_001 has failed for
'
+
e
);
console
.
info
(
'
fileio_test_dir_close_async_001 has failed for
'
+
e
);
expect
(
null
).
assertFail
();
}
});
/**
* @tc.number SUB_DF_FileIO_Dir_close_Async_0200
* @tc.name fileio_test_dir_close_async_002
* @tc.desc Test Dir close() interface,there are multiple parameters.
* @tc.size MEDIUM
* @tc.type Function
* @tc.level Level 0
* @tc.require
*/
it
(
'
fileio_test_dir_close_async_002
'
,
0
,
async
function
(
done
)
{
let
dpath
=
await
nextFileName
(
'
fileio_test_dir_close_async_002
'
)
+
'
d
'
;
try
{
expect
(
fileio
.
mkdirSync
(
dpath
)
==
null
).
assertTrue
();
let
dd
=
await
fileio
.
opendir
(
dpath
);
expect
(
dd
!==
null
).
assertTrue
();
dd
.
close
(
-
1
,
function
(
err
)
{
});
}
catch
(
e
)
{
console
.
info
(
'
fileio_test_dir_close_async_002 has failed for
'
+
e
);
expect
(
e
.
message
==
"
Number of arguments unmatched
"
).
assertTrue
();
expect
(
fileio
.
rmdirSync
(
dpath
)
==
null
).
assertTrue
();
done
();
}
});
});
storage/storagefileiojstest/src/main/js/default/test/module_fileio/class_dir/read.test.js
浏览文件 @
7d1d8aa2
此差异已折叠。
点击以展开。
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录