From e90c580cfb87ba5eb9a2997f75e029a3a2075469 Mon Sep 17 00:00:00 2001 From: yueye Date: Wed, 14 Jun 2023 02:08:45 +0000 Subject: [PATCH] =?UTF-8?q?fileio=E8=AF=BB=E5=86=99=E9=80=9F=E7=8E=87?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B=E4=BB=A3=E7=A0=81=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: yueye --- .../src/main/js/test/members/filerw.test.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/storage/storagefileiov9jstest/src/main/js/test/members/filerw.test.js b/storage/storagefileiov9jstest/src/main/js/test/members/filerw.test.js index ae44398c4..bae4d14be 100644 --- a/storage/storagefileiov9jstest/src/main/js/test/members/filerw.test.js +++ b/storage/storagefileiov9jstest/src/main/js/test/members/filerw.test.js @@ -40,15 +40,15 @@ export default function FileIOFilerw_test() { if (promise) { if (read) { fileIO.read(file.fd, array, { length: bf, offset: offset }).then((readLen) => { - console.log('fileIO_test_read_promise succeed' + readLen); }).catch((e) => { console.log('fileIO_test_read_promise has failed for ' + e.message + ', code: ' + e.code); + return -1; }); } else { fileIO.write(file.fd, array, { length: bf, offset: offset, encoding: 'utf-8' }).then((writeLen) => { - console.log('fileIO_test_write_promise succeed' + writeLen); }).catch((e) => { console.log('fileIO_test_write_promise has failed for ' + e.message + ', code: ' + e.code); + return -1; }); } } else { @@ -56,12 +56,14 @@ export default function FileIOFilerw_test() { fileIO.read(file.fd, array, { length: bf, offset: offset }, (err, readLen) => { if (err) { console.log('fileIO_test_read_callback has failed for ' + err.message + ', code: ' + err.code); + return -1; } }); } else { fileIO.write(file.fd, array, { length: bf, offset: offset, encoding: 'utf-8' }, (err, writeLen) => { if (err) { console.log('fileIO_test_write_callback has failed for ' + err.message + ', code: ' + err.code); + return -1; } }); } -- GitLab