|
|
@ -144,7 +144,7 @@ TEST_IMPL(fs_event_watch_dir) { |
|
|
|
uv_fs_rmdir(loop, &fs_req, "watch_dir", NULL); |
|
|
|
create_dir(loop, "watch_dir"); |
|
|
|
|
|
|
|
r = uv_fs_event_init(loop, &fs_event, "watch_dir", fs_event_cb_dir); |
|
|
|
r = uv_fs_event_init(loop, &fs_event, "watch_dir", fs_event_cb_dir, 0); |
|
|
|
ASSERT(r != -1); |
|
|
|
r = uv_timer_init(loop, &timer); |
|
|
|
ASSERT(r != -1); |
|
|
@ -178,7 +178,7 @@ TEST_IMPL(fs_event_watch_file) { |
|
|
|
create_file(loop, "watch_dir/file1"); |
|
|
|
create_file(loop, "watch_dir/file2"); |
|
|
|
|
|
|
|
r = uv_fs_event_init(loop, &fs_event, "watch_dir/file2", fs_event_cb_file); |
|
|
|
r = uv_fs_event_init(loop, &fs_event, "watch_dir/file2", fs_event_cb_file, 0); |
|
|
|
ASSERT(r != -1); |
|
|
|
r = uv_timer_init(loop, &timer); |
|
|
|
ASSERT(r != -1); |
|
|
@ -212,7 +212,7 @@ TEST_IMPL(fs_event_watch_file_current_dir) { |
|
|
|
create_file(loop, "watch_file"); |
|
|
|
|
|
|
|
r = uv_fs_event_init(loop, &fs_event, "watch_file", |
|
|
|
fs_event_cb_file_current_dir); |
|
|
|
fs_event_cb_file_current_dir, 0); |
|
|
|
ASSERT(r != -1); |
|
|
|
|
|
|
|
r = uv_timer_init(loop, &timer); |
|
|
@ -248,7 +248,11 @@ TEST_IMPL(fs_event_no_callback_on_close) { |
|
|
|
create_dir(loop, "watch_dir"); |
|
|
|
create_file(loop, "watch_dir/file1"); |
|
|
|
|
|
|
|
r = uv_fs_event_init(loop, &fs_event, "watch_dir/file1", fs_event_cb_file); |
|
|
|
r = uv_fs_event_init(loop, |
|
|
|
&fs_event, |
|
|
|
"watch_dir/file1", |
|
|
|
fs_event_cb_file, |
|
|
|
0); |
|
|
|
ASSERT(r != -1); |
|
|
|
|
|
|
|
uv_close((uv_handle_t*)&fs_event, close_cb); |
|
|
|