summaryrefslogtreecommitdiff
path: root/test/parallel/test-fs-readfile-fd.js
AgeCommit message (Collapse)Author
2019-08-10test: clean tmpdir on process exitJoão Reis
PR-URL: https://github.com/nodejs/node/pull/28858 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2018-12-15fs: make writeFile consistent with readFile wrt fdSakthipriyan Vairamani (thefourtheye)
As it is, `readFile` always reads from the current position of the file, if a file descriptor is used. But `writeFile` always writes from the beginning of the file. This patch fixes this inconsistency by making `writeFile` also to write from the current position of the file when used with a file descriptor. PR-URL: https://github.com/nodejs/node/pull/23709 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Anatoli Papirovski <apapirovski@mac.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-11-08test: fs readfile, swap arguments in strictEqualPetar Dodev
PR-URL: https://github.com/nodejs/node/pull/24133 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
2017-12-12test: add test description to fs.readFile testsJamie Davis
PR-URL: https://github.com/nodejs/node/pull/17610 Refs: https://github.com/nodejs/node/pull/17054#discussion_r155406755 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Evan Lucas <evanlucas@me.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Jon Moss <me@jonathanmoss.me> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2017-10-10test: use common.fixtures.path()Tobias Kieslich
PR-URL: https://github.com/nodejs/node/pull/16112 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
2017-01-11test: use eslint to fix var->const/letGibson Fahnestock
Manually fix issues that eslint --fix couldn't do automatically. PR-URL: https://github.com/nodejs/node/pull/10685 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Roman Reiss <me@silverwind.io>
2017-01-02test: increase usage of assert.ifError()cjihrig
PR-URL: https://github.com/nodejs/node/pull/10543 Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2016-01-13test: fix style issues after eslint updateMichaël Zasso
Replace var keyword with const or let. PR-URL: https://github.com/nodejs/io.js/pull/2286 Reviewed-By: Roman Reiss <me@silverwind.io>
2015-10-16fs: add file descriptor support to *File() funcsJohannes Wüller
These changes affect the following functions and their synchronous counterparts: * fs.readFile() * fs.writeFile() * fs.appendFile() If the first parameter is a uint32, it is treated as a file descriptor. In all other cases, the original implementation is used to ensure backwards compatibility. File descriptor ownership is never taken from the user. The documentation was adjusted to reflect these API changes. A note was added to make the user aware of file descriptor ownership and the conditions under which a file descriptor can be used by each of these functions. Tests were extended to test for file descriptor parameters under the conditions noted in the relevant documentation. PR-URL: https://github.com/nodejs/node/pull/3163 Reviewed-By: Trevor Norris <trev.norris@gmail.com>