未验证 提交 7027de48 编写于 作者: O openharmony_ci 提交者: Gitee

!8632 zlib接口可选入参解析规范修改 适配

Merge pull request !8632 from wangtiantian/zlib
......@@ -1462,24 +1462,22 @@ export default function ActsZlibTest() {
strategy: null
}).then((data) => {
console.log("compressFileStrategyNull invalid src file success!");
expect().assertFail();
}).catch((err) => {
console.log("compressFileStrategyNull zipFile fail: " + JSON.stringify(err));
expect().assertFail();
})
} catch (err) {
expect(err.code).assertEqual(PARAM_ERROR);
expect().assertFail();
}
try {
zlib.compressFile(path1, zipDest1, {
strategy: null
}, (err, data) => {
console.log("compressFile result");
expect().assertFail();
done();
})
} catch (err) {
expect(err.code).assertEqual(PARAM_ERROR);
expect().assertFail();
done();
}
console.log("==================compressFileOutFileNull end==================");
......@@ -1926,25 +1924,24 @@ export default function ActsZlibTest() {
strategy: null
}).then(data => {
console.log("decompressFile data: " + data);
expect().assertFail();
}).catch(err => {
console.log("decompress fail: " + JSON.stringify(err));
expect().assertFail();
})
} catch (err) {
console.log("decompress fail: " + JSON.stringify(err));
expect(err.code).assertEqual(PARAM_ERROR);
expect().assertFail();
}
try {
zlib.decompressFile(zipDest1, unzipdir, {
strategy: null
}, (err, data) => {
expect().assertFail();
console.log("decompressFile data: " + data);
done();
})
} catch (err) {
console.log("decompress fail: " + JSON.stringify(err));
expect(err.code).assertEqual(PARAM_ERROR);
expect().assertFail();
done();
}
console.log("==================decompressFileStrategyNull end==================");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册