FsReq.ReadDir test now reads all dirent's entries
Signed-off-by: Stefano Fiorentino <stefano.fiore84@gmail.com>
This commit is contained in:
parent
6fd64f93a0
commit
53da326aea
@ -783,10 +783,14 @@ TEST(FsReq, ReadDir) {
|
|||||||
checkFsCloseDirEvent = true;
|
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);
|
ASSERT_FALSE(checkFsReadDirEvent);
|
||||||
|
if (!event.eos) {
|
||||||
|
hndl.readdir();
|
||||||
|
} else {
|
||||||
checkFsReadDirEvent = true;
|
checkFsReadDirEvent = true;
|
||||||
hndl.closedir();
|
hndl.closedir();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
fsReq->on<uvw::FsEvent<uvw::FsReq::Type::OPENDIR>>([&checkFsOpenDirEvent](const auto &, auto &hndl) {
|
fsReq->on<uvw::FsEvent<uvw::FsReq::Type::OPENDIR>>([&checkFsOpenDirEvent](const auto &, auto &hndl) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user