Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Xts Acts
提交
cb116099
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看板
未验证
提交
cb116099
编写于
8月 18, 2022
作者:
O
openharmony_ci
提交者:
Gitee
8月 18, 2022
浏览文件
操作
浏览文件
下载
差异文件
!5026 修改File.test.js黄区测试问题
Merge pull request !5026 from raoxian/master
上级
e05713cd
476b6ed3
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
116 addition
and
118 deletion
+116
-118
storage/storagefilejstest/src/main/js/test/File.test.js
storage/storagefilejstest/src/main/js/test/File.test.js
+116
-118
未找到文件。
storage/storagefilejstest/src/main/js/test/File.test.js
浏览文件 @
cb116099
...
...
@@ -295,48 +295,45 @@ describe('fileTest', function () {
text
:
'
Text1.
'
,
success
:
function
()
{
console
.
info
(
'
File_writeText_002 call writeText success.
'
);
done
();
},
fail
:
function
(
data
,
code
)
{
console
.
info
(
'
File_writeText_002 call writeText fail, code:
'
+
code
+
'
, data:
'
+
data
);
expect
(
null
).
assertFail
();
},
});
file
.
writeText
({
uri
:
'
internal://cache/File_writeText_002
'
,
text
:
'
Text2.
'
,
append
:
true
,
success
:
function
()
{
console
.
info
(
'
File_writeText_002 call writeText success.
'
);
done
();
file
.
writeText
({
uri
:
'
internal://cache/File_writeText_002
'
,
text
:
'
Text2.
'
,
append
:
true
,
success
:
function
()
{
console
.
info
(
'
File_writeText_002 call writeText success.
'
);
file
.
readText
({
uri
:
'
internal://cache/File_writeText_002
'
,
success
:
function
(
data
)
{
console
.
info
(
'
File_writeText_002 call read success. Content:
'
);
file
.
delete
({
uri
:
'
internal://cache/File_writeText_002
'
,
success
:
function
()
{
console
.
info
(
'
File_writeText_002 call delete success
'
);
done
();
},
fail
:
function
(
data
,
code
)
{
console
.
info
(
'
File_writeText_002 call delete fail, code:
'
+
code
+
'
, data:
'
+
data
);
expect
(
null
).
assertFail
();
},
});
},
fail
:
function
(
data
,
code
)
{
console
.
info
(
'
File_writeText_002 call read fail, code:
'
+
code
+
'
, data:
'
+
data
);
expect
(
null
).
assertFail
();
},
});
},
fail
:
function
(
data
,
code
)
{
console
.
info
(
'
File_writeText_002 call writeText fail, code:
'
+
code
+
'
, data:
'
+
data
);
expect
(
null
).
assertFail
();
},
});
},
fail
:
function
(
data
,
code
)
{
console
.
info
(
'
File_writeText_002 call writeText fail, code:
'
+
code
+
'
, data:
'
+
data
);
expect
(
null
).
assertFail
();
},
});
file
.
readText
({
uri
:
'
internal://cache/File_writeText_002
'
,
success
:
function
(
data
)
{
console
.
info
(
'
File_writeText_002 call read success. Content:
'
);
done
();
},
fail
:
function
(
data
,
code
)
{
console
.
info
(
'
File_writeText_002 call read fail, code:
'
+
code
+
'
, data:
'
+
data
);
expect
(
null
).
assertFail
();
},
});
file
.
delete
({
uri
:
'
internal://cache/File_writeText_002
'
,
success
:
function
()
{
console
.
info
(
'
File_writeText_002 call delete success
'
);
done
();
},
fail
:
function
(
data
,
code
)
{
console
.
info
(
'
File_writeText_002 call delete fail, code:
'
+
code
+
'
, data:
'
+
data
);
expect
(
null
).
assertFail
();
},
});
});
/**
...
...
@@ -865,40 +862,45 @@ describe('fileTest', function () {
buffer
:
buf
,
success
:
function
()
{
console
.
info
(
'
File_writeArrayBuffer_005 call writeText success.
'
);
done
();
},
fail
:
function
(
data
,
code
)
{
console
.
info
(
'
File_writeArrayBuffer_005 , code:
'
+
code
+
'
, data:
'
+
data
);
expect
(
null
).
assertFail
();
},
});
file
.
writeArrayBuffer
({
uri
:
'
internal://cache/File_writeArrayBuffer_005
'
,
buffer
:
buf
,
position
:
10
,
success
:
function
()
{
console
.
info
(
'
File_writeArrayBuffer_005 call writeArrayBuffer success.
'
);
done
();
},
fail
:
function
(
data
,
code
)
{
console
.
info
(
'
File_writeArrayBuffer_005 , code:
'
+
code
+
'
, data:
'
+
data
);
expect
(
null
).
assertFail
();
},
});
file
.
readArrayBuffer
({
uri
:
'
internal://cache/File_writeArrayBuffer_005
'
,
success
:
function
(
data
)
{
console
.
info
(
'
File_writeArrayBuffer_005 read success:
'
);
done
();
file
.
writeArrayBuffer
({
uri
:
'
internal://cache/File_writeArrayBuffer_005
'
,
buffer
:
buf
,
position
:
10
,
success
:
function
()
{
console
.
info
(
'
File_writeArrayBuffer_005 call writeArrayBuffer success.
'
);
file
.
readArrayBuffer
({
uri
:
'
internal://cache/File_writeArrayBuffer_005
'
,
success
:
function
(
data
)
{
console
.
info
(
'
File_writeArrayBuffer_005 read success:
'
);
file
.
delete
({
uri
:
'
internal://cache/File_writeArrayBuffer_005
'
,
success
:
function
()
{
console
.
info
(
'
File_writeArrayBuffer_005 call delete success
'
);
done
();
},
fail
:
function
(
data
,
code
)
{
console
.
info
(
'
File_writeArrayBuffer_005 delete fail, code:
'
+
code
+
'
, data:
'
+
data
);
expect
(
null
).
assertFail
();
},
});
},
fail
:
function
(
data
,
code
)
{
console
.
info
(
'
File_writeArrayBuffer_005 read fail, code:
'
+
code
+
'
, data:
'
+
data
);
expect
(
null
).
assertFail
();
},
});
},
fail
:
function
(
data
,
code
)
{
console
.
info
(
'
File_writeArrayBuffer_005 writeArrayBuffer fail, code:
'
+
code
+
'
, data:
'
+
data
);
expect
(
null
).
assertFail
();
},
});
},
fail
:
function
(
data
,
code
)
{
console
.
info
(
'
File_writeArrayBuffer_005 , code:
'
+
code
+
'
, data:
'
+
data
);
console
.
info
(
'
File_writeArrayBuffer_005
writeText fail
, code:
'
+
code
+
'
, data:
'
+
data
);
expect
(
null
).
assertFail
();
},
});
file
.
delete
({
uri
:
'
internal://cache/File_writeArrayBuffer_005
'
});
});
/**
...
...
@@ -2103,26 +2105,25 @@ describe('fileTest', function () {
recursive
:
true
,
success
:
function
()
{
console
.
info
(
'
File_rmdir_002 mkdir success.
'
);
done
();
file
.
rmdir
({
uri
:
'
internal://app/test
'
,
recursive
:
false
,
success
:
function
()
{
console
.
info
(
'
File_rmdir_002 call rmdir success.
'
);
expect
(
null
).
assertFail
();
},
fail
:
function
(
data
,
code
)
{
console
.
info
(
'
File_rmdir_002 fail, code:
'
+
code
+
'
, data:
'
+
data
);
expect
(
code
==
301
||
code
==
300
).
assertTrue
();
done
();
},
});
},
fail
:
function
(
data
,
code
)
{
console
.
info
(
'
File_rmdir_002 fail, code:
'
+
code
+
'
, data:
'
+
data
);
expect
(
null
).
assertFail
();
},
});
file
.
rmdir
({
uri
:
'
internal://app/test
'
,
recursive
:
false
,
success
:
function
()
{
console
.
info
(
'
File_rmdir_002 call rmdir success.
'
);
expect
(
null
).
assertFail
();
},
fail
:
function
(
data
,
code
)
{
console
.
info
(
'
File_rmdir_002 fail, code:
'
+
code
+
'
, data:
'
+
data
);
expect
(
code
==
301
||
code
==
300
).
assertTrue
();
done
();
},
});
});
/**
...
...
@@ -2136,49 +2137,46 @@ describe('fileTest', function () {
recursive
:
true
,
success
:
function
()
{
console
.
info
(
'
File_rmdir_003 mkdir success.
'
);
done
();
},
fail
:
function
(
data
,
code
)
{
console
.
info
(
'
File_rmdir_003 fail, code:
'
+
code
+
'
, data:
'
+
data
);
expect
(
null
).
assertFail
();
},
});
file
.
mkdir
({
uri
:
'
internal://cache/test/File_rmdir_003_1/File_rmdir_003_1/File_rmdir_003_2
'
,
recursive
:
true
,
success
:
function
()
{
console
.
info
(
'
File_rmdir_003 mkdir success.
'
);
done
();
},
fail
:
function
(
data
,
code
)
{
console
.
info
(
'
File_rmdir_003 fail, code:
'
+
code
+
'
, data:
'
+
data
);
expect
(
null
).
assertFail
();
},
});
file
.
mkdir
({
uri
:
'
internal://cache/test/File_rmdir_003_2/File_rmdir_003_1/File_rmdir_003_2
'
,
recursive
:
true
,
success
:
function
()
{
console
.
info
(
'
File_rmdir_003 mkdir success.
'
);
done
();
file
.
mkdir
({
uri
:
'
internal://cache/test/File_rmdir_003_1/File_rmdir_003_1/File_rmdir_003_2
'
,
recursive
:
true
,
success
:
function
()
{
console
.
info
(
'
File_rmdir_003 mkdir success.
'
);
file
.
mkdir
({
uri
:
'
internal://cache/test/File_rmdir_003_2/File_rmdir_003_1/File_rmdir_003_2
'
,
recursive
:
true
,
success
:
function
()
{
console
.
info
(
'
File_rmdir_003 mkdir success.
'
);
file
.
rmdir
({
uri
:
'
internal://cache/test
'
,
recursive
:
true
,
success
:
function
()
{
console
.
info
(
'
File_rmdir_003 call rmdir success.
'
);
done
();
},
fail
:
function
(
data
,
code
)
{
console
.
info
(
'
File_rmdir_003 , code:
'
+
code
+
'
, data:
'
+
data
);
expect
(
null
).
assertFail
();
},
});
},
fail
:
function
(
data
,
code
)
{
console
.
info
(
'
File_rmdir_003 fail, code:
'
+
code
+
'
, data:
'
+
data
);
expect
(
null
).
assertFail
();
},
});
},
fail
:
function
(
data
,
code
)
{
console
.
info
(
'
File_rmdir_003 fail, code:
'
+
code
+
'
, data:
'
+
data
);
expect
(
null
).
assertFail
();
},
});
},
fail
:
function
(
data
,
code
)
{
console
.
info
(
'
File_rmdir_003 fail, code:
'
+
code
+
'
, data:
'
+
data
);
expect
(
null
).
assertFail
();
},
});
file
.
rmdir
({
uri
:
'
internal://cache/test
'
,
recursive
:
true
,
success
:
function
()
{
console
.
info
(
'
File_rmdir_003 call rmdir success.
'
);
done
();
},
fail
:
function
(
data
,
code
)
{
console
.
info
(
'
File_rmdir_003 , code:
'
+
code
+
'
, data:
'
+
data
);
expect
(
null
).
assertFail
();
},
});
});
/**
...
...
@@ -2208,13 +2206,13 @@ describe('fileTest', function () {
*/
it
(
'
File_rmdir_005
'
,
0
,
async
function
(
done
)
{
file
.
rmdir
({
uri
:
'
internal://app/
notdir/
123
'
,
uri
:
'
internal://app/123
'
,
success
:
function
()
{
console
.
info
(
'
File_rmdir_005 call rmdir success.
'
);
expect
(
null
).
assertFail
();
},
fail
:
function
(
data
,
code
)
{
console
.
info
(
'
File_rmdir_005 , code:
'
+
code
+
'
, data:
'
+
data
);
console
.
info
(
'
File_rmdir_005
rmdir fail
, code:
'
+
code
+
'
, data:
'
+
data
);
expect
(
code
==
301
).
assertTrue
();
done
();
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录