diff options
author | cjihrig <cjihrig@gmail.com> | 2018-02-21 15:42:26 -0500 |
---|---|---|
committer | cjihrig <cjihrig@gmail.com> | 2018-02-23 09:51:30 -0500 |
commit | 3a191229418dcc0e21956847993b1702c88a923b (patch) | |
tree | 23def7030d5bb38b47880a827d3e85576cac2008 /deps/uv/test/test-fs-copyfile.c | |
parent | 3cef3e61d647d3dd2107087d876a3a02e0c3961e (diff) | |
download | node-new-3a191229418dcc0e21956847993b1702c88a923b.tar.gz |
deps: upgrade libuv to 1.19.2
PR-URL: https://github.com/nodejs/node/pull/18918
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Diffstat (limited to 'deps/uv/test/test-fs-copyfile.c')
-rw-r--r-- | deps/uv/test/test-fs-copyfile.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/deps/uv/test/test-fs-copyfile.c b/deps/uv/test/test-fs-copyfile.c index 460c1dc6ae..4b1fdc5e79 100644 --- a/deps/uv/test/test-fs-copyfile.c +++ b/deps/uv/test/test-fs-copyfile.c @@ -36,6 +36,10 @@ static const char dst[] = "test_file_dst"; static int result_check_count; +static void fail_cb(uv_fs_t* req) { + FATAL("fail_cb should not have been called"); +} + static void handle_result(uv_fs_t* req) { uv_fs_t stat_req; uint64_t size; @@ -158,7 +162,12 @@ TEST_IMPL(fs_copyfile) { ASSERT(result_check_count == 5); uv_run(loop, UV_RUN_DEFAULT); ASSERT(result_check_count == 6); - unlink(dst); /* Cleanup */ + /* If the flags are invalid, the loop should not be kept open */ + unlink(dst); + r = uv_fs_copyfile(loop, &req, fixture, dst, -1, fail_cb); + ASSERT(r == UV_EINVAL); + uv_run(loop, UV_RUN_DEFAULT); + unlink(dst); /* Cleanup */ return 0; } |