diff options
author | Vse Mozhet Byt <vsemozhetbyt@gmail.com> | 2017-03-03 17:09:43 +0300 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2017-03-06 01:25:09 +0300 |
commit | a4d14363a91dca6205184ae6488685fa93d94346 (patch) | |
tree | c9b7dad81a3259cfddeadb16699f0929c43402d8 /test | |
parent | 8377374754e0be64250146c5d24107642b0449c3 (diff) |
test: fix args in parallel/test-fs-null-bytes.js
The functions `fs.appendFile()` and `fs.writeFile()`
were being called without the required `data` argument.
Refs: https://github.com/nodejs/node/issues/11595
PR-URL: https://github.com/nodejs/node/pull/11601
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Nikolai Vavilov <vvnicholas@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-fs-null-bytes.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/parallel/test-fs-null-bytes.js b/test/parallel/test-fs-null-bytes.js index c56c8ff7cea..522a1591e63 100644 --- a/test/parallel/test-fs-null-bytes.js +++ b/test/parallel/test-fs-null-bytes.js @@ -23,7 +23,7 @@ function check(async, sync) { check(fs.access, fs.accessSync, 'foo\u0000bar'); check(fs.access, fs.accessSync, 'foo\u0000bar', fs.F_OK); -check(fs.appendFile, fs.appendFileSync, 'foo\u0000bar'); +check(fs.appendFile, fs.appendFileSync, 'foo\u0000bar', 'abc'); check(fs.chmod, fs.chmodSync, 'foo\u0000bar', '0644'); check(fs.chown, fs.chownSync, 'foo\u0000bar', 12, 34); check(fs.link, fs.linkSync, 'foo\u0000bar', 'foobar'); @@ -47,14 +47,14 @@ check(null, fs.unwatchFile, 'foo\u0000bar', common.mustNotCall()); check(fs.utimes, fs.utimesSync, 'foo\u0000bar', 0, 0); check(null, fs.watch, 'foo\u0000bar', common.mustNotCall()); check(null, fs.watchFile, 'foo\u0000bar', common.mustNotCall()); -check(fs.writeFile, fs.writeFileSync, 'foo\u0000bar'); +check(fs.writeFile, fs.writeFileSync, 'foo\u0000bar', 'abc'); const fileUrl = new URL('file:///C:/foo\u0000bar'); const fileUrl2 = new URL('file:///C:/foo%00bar'); check(fs.access, fs.accessSync, fileUrl); check(fs.access, fs.accessSync, fileUrl, fs.F_OK); -check(fs.appendFile, fs.appendFileSync, fileUrl); +check(fs.appendFile, fs.appendFileSync, fileUrl, 'abc'); check(fs.chmod, fs.chmodSync, fileUrl, '0644'); check(fs.chown, fs.chownSync, fileUrl, 12, 34); check(fs.link, fs.linkSync, fileUrl, 'foobar'); @@ -78,11 +78,11 @@ check(null, fs.unwatchFile, fileUrl, common.fail); check(fs.utimes, fs.utimesSync, fileUrl, 0, 0); check(null, fs.watch, fileUrl, common.fail); check(null, fs.watchFile, fileUrl, common.fail); -check(fs.writeFile, fs.writeFileSync, fileUrl); +check(fs.writeFile, fs.writeFileSync, fileUrl, 'abc'); check(fs.access, fs.accessSync, fileUrl2); check(fs.access, fs.accessSync, fileUrl2, fs.F_OK); -check(fs.appendFile, fs.appendFileSync, fileUrl2); +check(fs.appendFile, fs.appendFileSync, fileUrl2, 'abc'); check(fs.chmod, fs.chmodSync, fileUrl2, '0644'); check(fs.chown, fs.chownSync, fileUrl2, 12, 34); check(fs.link, fs.linkSync, fileUrl2, 'foobar'); @@ -106,7 +106,7 @@ check(null, fs.unwatchFile, fileUrl2, common.fail); check(fs.utimes, fs.utimesSync, fileUrl2, 0, 0); check(null, fs.watch, fileUrl2, common.fail); check(null, fs.watchFile, fileUrl2, common.fail); -check(fs.writeFile, fs.writeFileSync, fileUrl2); +check(fs.writeFile, fs.writeFileSync, fileUrl2, 'abc'); // an 'error' for exists means that it doesn't exist. // one of many reasons why this file is the absolute worst. |