From 53da326aeaaabbca312c85f504bf8263ae57cfb7 Mon Sep 17 00:00:00 2001 From: Stefano Fiorentino Date: Wed, 25 Mar 2020 23:14:48 +0100 Subject: [PATCH] FsReq.ReadDir test now reads all dirent's entries Signed-off-by: Stefano Fiorentino --- test/uvw/fs_req.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/test/uvw/fs_req.cpp b/test/uvw/fs_req.cpp index 2cc127ea..c67f324b 100644 --- a/test/uvw/fs_req.cpp +++ b/test/uvw/fs_req.cpp @@ -783,10 +783,14 @@ TEST(FsReq, ReadDir) { checkFsCloseDirEvent = true; }); - fsReq->on>([&checkFsReadDirEvent](const auto &, auto &hndl) { + fsReq->on>([&checkFsReadDirEvent](const auto &event, auto &hndl) { ASSERT_FALSE(checkFsReadDirEvent); - checkFsReadDirEvent = true; - hndl.closedir(); + if (!event.eos) { + hndl.readdir(); + } else { + checkFsReadDirEvent = true; + hndl.closedir(); + } }); fsReq->on>([&checkFsOpenDirEvent](const auto &, auto &hndl) {