diff options
author | Darshan Sen <raisinten@gmail.com> | 2021-01-29 17:01:52 +0300 |
---|---|---|
committer | Danielle Adams <adamzdanielle@gmail.com> | 2021-02-16 17:12:44 +0300 |
commit | c30245072a714839d9dd93636e0b1cc3a4f93752 (patch) | |
tree | 36e621a61ad9ba6e99f3b1366bb2334b2db1f074 /test | |
parent | 48a634e514718e4d94785e5873d1d365d9dccade (diff) |
fs: allow passing negative zero fd
Fixes: https://github.com/nodejs/node/issues/37122
PR-URL: https://github.com/nodejs/node/pull/37123
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-fs-stat.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/parallel/test-fs-stat.js b/test/parallel/test-fs-stat.js index 31aec8fab00..92a6ec8fa32 100644 --- a/test/parallel/test-fs-stat.js +++ b/test/parallel/test-fs-stat.js @@ -47,6 +47,8 @@ fs.lstat('.', common.mustSucceed(function(stats) { fs.open('.', 'r', undefined, common.mustSucceed(function(fd) { assert.ok(fd); + fs.fstat(-0, common.mustSucceed()); + fs.fstat(fd, common.mustSucceed(function(stats) { assert.ok(stats.mtime instanceof Date); fs.close(fd, assert.ifError); |