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

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

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