Add test for uv_fs_readdir sync

This commit is contained in:
Ryan Dahl 2011-09-04 16:54:27 -07:00
parent 142a70292b
commit 7ccc7470e0

View File

@ -540,6 +540,10 @@ TEST_IMPL(fs_async_dir) {
uv_run(loop);
ASSERT(readdir_cb_count == 1);
/* sync uv_fs_readdir */
r = uv_fs_readdir(loop, &readdir_req, "test_dir", 0, NULL);
readdir_cb(&readdir_req);
r = uv_fs_stat(loop, &stat_req, "test_dir", stat_cb);
ASSERT(r == 0);
uv_run(loop);
@ -1050,4 +1054,4 @@ TEST_IMPL(fs_symlink) {
unlink("test_file_symlink2_symlink");
return 0;
}
}