Skip to content

Commit 7d4941f

Browse files
vsemozhetbytMylesBorins
authored andcommitted
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: #11595 Backport-PR-URL: #12477 PR-URL: #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>
1 parent 858bbaa commit 7d4941f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/parallel/test-fs-null-bytes.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ function check(async, sync) {
2222

2323
check(fs.access, fs.accessSync, 'foo\u0000bar');
2424
check(fs.access, fs.accessSync, 'foo\u0000bar', fs.F_OK);
25-
check(fs.appendFile, fs.appendFileSync, 'foo\u0000bar');
25+
check(fs.appendFile, fs.appendFileSync, 'foo\u0000bar', 'abc');
2626
check(fs.chmod, fs.chmodSync, 'foo\u0000bar', '0644');
2727
check(fs.chown, fs.chownSync, 'foo\u0000bar', 12, 34);
2828
check(fs.link, fs.linkSync, 'foo\u0000bar', 'foobar');
@@ -46,7 +46,7 @@ check(null, fs.unwatchFile, 'foo\u0000bar', common.fail);
4646
check(fs.utimes, fs.utimesSync, 'foo\u0000bar', 0, 0);
4747
check(null, fs.watch, 'foo\u0000bar', common.fail);
4848
check(null, fs.watchFile, 'foo\u0000bar', common.fail);
49-
check(fs.writeFile, fs.writeFileSync, 'foo\u0000bar');
49+
check(fs.writeFile, fs.writeFileSync, 'foo\u0000bar', 'abc');
5050

5151
// an 'error' for exists means that it doesn't exist.
5252
// one of many reasons why this file is the absolute worst.

0 commit comments

Comments
 (0)