Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDarshan Sen <raisinten@gmail.com>2021-01-29 17:01:52 +0300
committerDanielle Adams <adamzdanielle@gmail.com>2021-02-16 17:12:44 +0300
commitc30245072a714839d9dd93636e0b1cc3a4f93752 (patch)
tree36e621a61ad9ba6e99f3b1366bb2334b2db1f074 /test
parent48a634e514718e4d94785e5873d1d365d9dccade (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.js2
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);