diff --git a/storage/storagefileiojstest/src/main/js/test/FileIO.test.js b/storage/storagefileiojstest/src/main/js/test/FileIO.test.js index 2edd2c2efdac7015fa79f6e627cf6fa354e62221..86b54e24d2d40c8cb9df4239308138671a6ba43d 100644 --- a/storage/storagefileiojstest/src/main/js/test/FileIO.test.js +++ b/storage/storagefileiojstest/src/main/js/test/FileIO.test.js @@ -4054,7 +4054,7 @@ export default function fileIOTest() { let fpath = await nextFileName('fileio_test_stat_promise_011'); expect(prepareFile(fpath, FILE_CONTENT)).assertTrue(); fileio.chmodSync(fpath, 0o640); - await fileio.stat(fpath).then((stat)=> { + fileio.stat(fpath).then((stat)=> { expect((stat.mode & 0o777) == 0o640).assertTrue(); fileio.unlinkSync(fpath); console.info('file stat Success'); @@ -4314,7 +4314,7 @@ export default function fileIOTest() { let fpath = await nextFileName('fileio_test_close_async_001'); expect(prepareFile(fpath, FILE_CONTENT)).assertTrue(); let fd = fileio.openSync(fpath); - await fileio.close(fd, function (err) { + fileio.close(fd, function (err) { fileio.unlinkSync(fpath); }); }); diff --git a/storage/storagefileiojstest/src/main/js/test/module_fileio/class_stream/close.test.js b/storage/storagefileiojstest/src/main/js/test/module_fileio/class_stream/close.test.js index 59406a6b24a0732467aaa19660dca6f46cb73a2f..493c7a5c83546277e4964a1d5e239c499f8b4287 100644 --- a/storage/storagefileiojstest/src/main/js/test/module_fileio/class_stream/close.test.js +++ b/storage/storagefileiojstest/src/main/js/test/module_fileio/class_stream/close.test.js @@ -84,8 +84,8 @@ describe('fileio_stream_close', function () { expect(prepareFile(fpath, FILE_CONTENT)).assertTrue(); try { - let fd = await fileio.openSync(fpath, 0o2); - let ss = await fileio.fdopenStreamSync(fd, 'r+'); + let fd = fileio.openSync(fpath, 0o2); + let ss = fileio.fdopenStreamSync(fd, 'r+'); expect(ss !== null).assertTrue(); await ss.close(); fileio.unlinkSync(fpath); @@ -110,8 +110,8 @@ describe('fileio_stream_close', function () { expect(prepareFile(fpath, FILE_CONTENT)).assertTrue(); try { - let fd = await fileio.openSync(fpath, 0o2); - let ss = await fileio.fdopenStreamSync(fd, 'r+'); + let fd = fileio.openSync(fpath, 0o2); + let ss = fileio.fdopenStreamSync(fd, 'r+'); expect(ss !== null).assertTrue(); ss.close(function (err) { fileio.unlinkSync(fpath); diff --git a/storage/storagefileiojstest/src/main/js/test/module_fileio/class_stream/flush.test.js b/storage/storagefileiojstest/src/main/js/test/module_fileio/class_stream/flush.test.js index 68273dd44b1add76f5ba8757d75010a276c3e853..62eab7098f43fbebe91d66871f4c63bbaad28e89 100644 --- a/storage/storagefileiojstest/src/main/js/test/module_fileio/class_stream/flush.test.js +++ b/storage/storagefileiojstest/src/main/js/test/module_fileio/class_stream/flush.test.js @@ -87,7 +87,7 @@ describe('fileio_stream_flush', function () { expect(prepareFile(fpath, FILE_CONTENT)).assertTrue(); try { - let ss = await fileio.createStreamSync(fpath, 'r+'); + let ss = fileio.createStreamSync(fpath, 'r+'); expect(ss !== null).assertTrue(); expect(ss.writeSync(FILE_CONTENT) == FILE_CONTENT.length).assertTrue(); ss.flush().then( @@ -116,7 +116,7 @@ describe('fileio_stream_flush', function () { expect(prepareFile(fpath, FILE_CONTENT)).assertTrue(); try { - let ss = await fileio.createStreamSync(fpath, 'r+'); + let ss = fileio.createStreamSync(fpath, 'r+'); expect(ss !== null).assertTrue(); expect(ss.writeSync(FILE_CONTENT) == FILE_CONTENT.length).assertTrue(); ss.flush(function (err) { diff --git a/storage/storagefileiojstest/src/main/js/test/module_fileio/members/createStream.test.js b/storage/storagefileiojstest/src/main/js/test/module_fileio/members/createStream.test.js index f9f2418c98001bfe983984b1d31b465e19189be6..a73b4ab4e1da318b55b64d1a47cbdc0301e1a87e 100644 --- a/storage/storagefileiojstest/src/main/js/test/module_fileio/members/createStream.test.js +++ b/storage/storagefileiojstest/src/main/js/test/module_fileio/members/createStream.test.js @@ -61,7 +61,7 @@ describe('fileio_createStream', function () { expect(prepareFile(fpath, FILE_CONTENT)).assertTrue(); try { - await fileio.createStream(fpath, 'r+', function (err, stream) { + fileio.createStream(fpath, 'r+', function (err, stream) { expect(stream.closeSync() == null).assertTrue(); expect(fileio.unlinkSync(fpath) == null).assertTrue(); done(); @@ -86,7 +86,7 @@ describe('fileio_createStream', function () { expect(prepareFile(fpath, FILE_CONTENT)).assertTrue(); try { - await fileio.createStream(fpath, 'r+', function (err, stream) { + fileio.createStream(fpath, 'r+', function (err, stream) { expect(stream.writeSync(FILE_CONTENT) == FILE_CONTENT.length).assertTrue(); expect(stream.closeSync() == null).assertTrue(); expect(fileio.unlinkSync(fpath) == null).assertTrue(); diff --git a/storage/storagefileiojstest/src/main/js/test/module_fileio/members/open.test.js b/storage/storagefileiojstest/src/main/js/test/module_fileio/members/open.test.js index 8a3adc8e650b17980a62c8ccbfacf6043e055048..cc8bb059e3f06e22de70d1292eb190d515638958 100644 --- a/storage/storagefileiojstest/src/main/js/test/module_fileio/members/open.test.js +++ b/storage/storagefileiojstest/src/main/js/test/module_fileio/members/open.test.js @@ -57,7 +57,6 @@ describe('fileio_open', function () { fileio.open(fpath, 0, 0o0400, function (err, fd) { fileio.read(fd, new ArrayBuffer(4096)) .then(function (res) { - expect((String.fromCharCode.apply(null, new Uint8Array(res.buffer))) == FILE_CONTENT).assertTrue; expect(res.bytesRead == FILE_CONTENT.length).assertTrue(); fileio.closeSync(fd); fileio.unlinkSync(fpath); @@ -87,7 +86,6 @@ describe('fileio_open', function () { await fileio.open(fpath, 0, 0o0400, function (err, fd) { fileio.read(fd, new ArrayBuffer(4096)) .then(function (res) { - expect((String.fromCharCode.apply(null, new Uint8Array(res.buffer))) == FILE_CONTENT).assertTrue; expect(res.bytesRead == FILE_CONTENT.length).assertTrue(); fileio.closeSync(fd); fileio.unlinkSync(fpath); @@ -116,7 +114,6 @@ describe('fileio_open', function () { await fileio.open(fpath, 0, function (err, fd) { fileio.read(fd, new ArrayBuffer(4096)) .then(function (res) { - expect((String.fromCharCode.apply(null, new Uint8Array(res.buffer))) == FILE_CONTENT).assertTrue; expect(res.bytesRead == FILE_CONTENT.length).assertTrue(); fileio.closeSync(fd); fileio.unlinkSync(fpath); @@ -145,7 +142,6 @@ describe('fileio_open', function () { fileio.open(fpath, 0o2, function (err, fd) { fileio.read(fd, new ArrayBuffer(4096)) .then(function (res) { - expect((String.fromCharCode.apply(null, new Uint8Array(res.buffer))) == FILE_CONTENT).assertTrue; expect(res.bytesRead == FILE_CONTENT.length).assertTrue(); fileio.closeSync(fd); fileio.unlinkSync(fpath); @@ -175,7 +171,6 @@ describe('fileio_open', function () { .then(function (fd) { fileio.read(fd, new ArrayBuffer(4096)) .then(function (res) { - expect((String.fromCharCode.apply(null, new Uint8Array(res.buffer))) == FILE_CONTENT).assertTrue; expect(res.bytesRead == FILE_CONTENT.length).assertTrue(); fileio.closeSync(fd); fileio.unlinkSync(fpath); @@ -207,7 +202,6 @@ describe('fileio_open', function () { .then(function (fd) { fileio.read(fd, new ArrayBuffer(4096)) .then(function (res) { - expect((String.fromCharCode.apply(null, new Uint8Array(res.buffer))) == FILE_CONTENT).assertTrue; expect(res.bytesRead == FILE_CONTENT.length).assertTrue(); fileio.closeSync(fd); fileio.unlinkSync(fpath); @@ -239,7 +233,6 @@ describe('fileio_open', function () { .then(function (fd) { fileio.read(fd, new ArrayBuffer(4096)) .then(function (res) { - expect((String.fromCharCode.apply(null, new Uint8Array(res.buffer))) == FILE_CONTENT).assertTrue; expect(res.bytesRead == FILE_CONTENT.length).assertTrue(); fileio.closeSync(fd); fileio.unlinkSync(fpath); diff --git a/storage/storagefileiojstest/src/main/js/test/module_fileio/members/readtext.test.js b/storage/storagefileiojstest/src/main/js/test/module_fileio/members/readtext.test.js index 67d4727df5cbed933c86c25673e4424046be74eb..3cd246572d7886c693ee7ee7f91e6daba9a1ce67 100644 --- a/storage/storagefileiojstest/src/main/js/test/module_fileio/members/readtext.test.js +++ b/storage/storagefileiojstest/src/main/js/test/module_fileio/members/readtext.test.js @@ -171,7 +171,7 @@ describe('fileio_readtext', function () { expect(prepareFile(fpath, FILE_CONTENT)).assertTrue(); try { - await fileio.readText(fpath, { position: pos, length: len, encoding: 'UTF-8' }, function (err, str) { + fileio.readText(fpath, { position: pos, length: len, encoding: 'UTF-8' }, function (err, str) { expect(str == FILE_CONTENT.substr(pos, len)).assertTrue(); expect(fileio.unlinkSync(fpath) == null).assertTrue(); done(); @@ -198,7 +198,7 @@ describe('fileio_readtext', function () { expect(prepareFile(fpath, FILE_CONTENT)).assertTrue(); try { - await fileio.readText(fpath, { position: 1 }, function (err, str) { + fileio.readText(fpath, { position: 1 }, function (err, str) { expect(str == FILE_CONTENT.substr(pos, len)).assertTrue(); expect(fileio.unlinkSync(fpath) == null).assertTrue(); done(); @@ -225,7 +225,7 @@ describe('fileio_readtext', function () { expect(prepareFile(fpath, FILE_CONTENT)).assertTrue(); try { - await fileio.readText(fpath, { position: 1 }, function (err, str) { + fileio.readText(fpath, { position: 1 }, function (err, str) { expect(str == FILE_CONTENT.substr(pos, len)).assertTrue(); expect(fileio.unlinkSync(fpath) == null).assertTrue(); }); diff --git a/storage/storagefileiojstest/src/main/js/test/module_fileio/members/rename.test.js b/storage/storagefileiojstest/src/main/js/test/module_fileio/members/rename.test.js index a8a624e3d142925b001bb3e027f7bd487a2f895e..f54e9f9969b53bd901c2d1738049432099a9587f 100644 --- a/storage/storagefileiojstest/src/main/js/test/module_fileio/members/rename.test.js +++ b/storage/storagefileiojstest/src/main/js/test/module_fileio/members/rename.test.js @@ -35,7 +35,7 @@ describe('fileio_rename', function () { try { let newf = fpath + '123'; - await fileio.rename(fpath, newf) + fileio.rename(fpath, newf) .then(function (err) { expect(fileio.accessSync(newf) == null).assertTrue(); expect(err == null).assertTrue(); @@ -65,7 +65,7 @@ describe('fileio_rename', function () { try { let newf = fpath + 'aaa'; - await fileio.rename(fpath, newf, function (err) { + fileio.rename(fpath, newf, function (err) { expect(fileio.accessSync(newf) == null).assertTrue(); expect(fileio.unlinkSync(newf) == null).assertTrue(); done(); @@ -89,7 +89,7 @@ describe('fileio_rename', function () { expect(prepareFile(fpath, FILE_CONTENT)).assertTrue(); try { - await fileio.access(fpath).then(function (err) { + fileio.access(fpath).then(function (err) { let newf = fpath + '123'; fileio.rename(fpath, newf) .then(function (err) { diff --git a/storage/storagefileiojstest/src/main/js/test/module_fileio/members/symlink.test.js b/storage/storagefileiojstest/src/main/js/test/module_fileio/members/symlink.test.js index a6fb5d93808c583ba4088e5d4797bee3d7d03b84..a779d84d22f8d05695f2252bd6c8901810151cef 100644 --- a/storage/storagefileiojstest/src/main/js/test/module_fileio/members/symlink.test.js +++ b/storage/storagefileiojstest/src/main/js/test/module_fileio/members/symlink.test.js @@ -86,7 +86,7 @@ describe('fileio_symlink', function () { expect(prepareFile(fpath, FILE_CONTENT)).assertTrue(); try { - await fileio.symlink(fpath, fpath + 'pass2', function (err) { + fileio.symlink(fpath, fpath + 'pass2', function (err) { fileio.accessSync(fpath + 'pass2'); fileio.unlinkSync(fpath); fileio.unlinkSync(fpath + 'pass2'); diff --git a/storage/storagefileiojstest/src/main/js/test/module_fileio/members/write.test.js b/storage/storagefileiojstest/src/main/js/test/module_fileio/members/write.test.js index cd6739a46b2896d8af2fc6e96d8ebc0ba0aec713..c333ca627d72ba3e20f12a25e22fe32affebf96d 100644 --- a/storage/storagefileiojstest/src/main/js/test/module_fileio/members/write.test.js +++ b/storage/storagefileiojstest/src/main/js/test/module_fileio/members/write.test.js @@ -435,7 +435,7 @@ describe('fileio_write', function () { try { let fd = fileio.openSync(fpath, 0o102, 0o666); expect(isIntNum(fd)).assertTrue(); - await fileio.write(fd, new ArrayBuffer(4096), function ( + fileio.write(fd, new ArrayBuffer(4096), function ( error, bytesWritten ) { @@ -465,7 +465,7 @@ describe('fileio_write', function () { try { let fd = fileio.openSync(fpath, 0o102, 0o666); expect(isIntNum(fd)).assertTrue(); - await fileio.write( + fileio.write( fd, FILE_CONTENT, { @@ -498,7 +498,7 @@ describe('fileio_write', function () { try { let fd = fileio.openSync(fpath, 0o102, 0o666); expect(isIntNum(fd)).assertTrue(); - await fileio.write( + fileio.write( fd, FILE_CONTENT, { @@ -532,7 +532,7 @@ describe('fileio_write', function () { try { let fd = fileio.openSync(fpath, 0o102, 0o666); expect(isIntNum(fd)).assertTrue(); - await fileio.write( + fileio.write( fd, FILE_CONTENT, { @@ -567,7 +567,7 @@ describe('fileio_write', function () { try { let fd = fileio.openSync(fpath, 0o102, 0o666); expect(isIntNum(fd)).assertTrue(); - await fileio.write( + fileio.write( fd, FILE_CONTENT, {