FsReq.ReadDir test now reads all dirent's entries

Signed-off-by: Stefano Fiorentino <stefano.fiore84@gmail.com>
This commit is contained in:
Stefano Fiorentino 2020-03-25 23:14:48 +01:00
parent 6fd64f93a0
commit 53da326aea

View File

@ -783,10 +783,14 @@ TEST(FsReq, ReadDir) {
checkFsCloseDirEvent = true;
});
fsReq->on<uvw::FsEvent<uvw::FsReq::Type::READDIR>>([&checkFsReadDirEvent](const auto &, auto &hndl) {
fsReq->on<uvw::FsEvent<uvw::FsReq::Type::READDIR>>([&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<uvw::FsEvent<uvw::FsReq::Type::OPENDIR>>([&checkFsOpenDirEvent](const auto &, auto &hndl) {