提交 3f93c7ca 编写于 作者: Z zhangxingxia

update filemanager xts

Signed-off-by: Nzhangxingxia <zhangxingxia1@huawei.com>
上级 67ec76e5
......@@ -10,26 +10,26 @@
{
"type": "ShellKit",
"run-command": [
"mkdir /storage/media/100/local/files/photo",
"mkdir /storage/media/100/local/files/document",
"mkdir /storage/media/100/local/files/video",
"mkdir /storage/media/100/local/files/audio",
"mkdir /storage/media/100/local/files/photo/weixin",
"mkdir -p /storage/media/100/local/files/photo",
"mkdir -p /storage/media/100/local/files/document",
"mkdir -p /storage/media/100/local/files/video",
"mkdir -p /storage/media/100/local/files/audio",
"mkdir -p /storage/media/100/local/files/photo/weixin",
"touch /storage/media/100/local/files/photo/weixin/1.jpg",
"touch /storage/media/100/local/files/photo/weixin/2.jpg",
"touch /storage/media/100/local/files/photo/weixin/3.jpg",
"touch /storage/media/100/local/files/photo/weixin/1.mp3",
"touch /storage/media/100/local/files/photo/weixin/1.mp4",
"mkdir /storage/media/100/local/files/photo/taobao",
"mkdir -p /storage/media/100/local/files/photo/taobao",
"touch /storage/media/100/local/files/photo/taobao/1.mp4",
"mkdir /storage/media/100/local/files/taobao",
"mkdir -p /storage/media/100/local/files/taobao",
"touch /storage/media/100/local/files/taobao/1.jpg",
"mkdir /storage/media/100/local/files/image",
"mkdir -p /storage/media/100/local/files/image",
"touch /storage/media/100/local/files/image/1.jpg",
"touch /storage/media/100/local/files/image/2.jpg",
"mkdir /storage/media/100/local/files/alarms",
"mkdir -p /storage/media/100/local/files/alarms",
"touch /storage/media/100/local/files/alarms/tree.mp3",
"mkdir /storage/media/100/local/files/wps",
"mkdir -p /storage/media/100/local/files/wps",
"touch /storage/media/100/local/files/wps/news.pdf",
"touch /storage/media/100/local/files/wps/introduce.doc",
"killall com.ohos.medialibrary.MediaScannerAbilityA",
......
......@@ -35,6 +35,7 @@ let FILE_ROOT = "";
let AUDIO_ROOT = "";
let IMAGE_ALBUM = "";
let LOG_ = "FMS_XTS_TEXT: ";
let LENGTH = 0;
describe("filemanager_test", function () {
/**
......@@ -242,10 +243,16 @@ describe("filemanager_test", function () {
it("filemanager_test_list_file_async_002", 0, async function (done) {
try {
let path = FILE_ROOT;
filemanager.listFile(path, "file", function(error,fileInfos){
let options = {
dev:{
"name":"local"
},
offset:0
};
let fileInfos = await filemanager.listFile(path, "file",options);
LENGTH = fileInfos.length;
expect(Array.isArray(fileInfos)).assertTrue();
done();
});
} catch (error) {
console.log("filemanager_test_list_file_async_002 has failed for " + error);
expect(null).assertFail();
......@@ -302,6 +309,7 @@ describe("filemanager_test", function () {
};
filemanager.listFile(path, "file", options, function(error,fileInfos){
expect(Array.isArray(fileInfos)).assertTrue();
expect(fileInfos.length == LENGTH-2).assertTrue();
done();
});
} catch (error) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册