From 7d4941f01a3419cbbbd815495386a846db191acd Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Fri, 3 Mar 2017 16:09:43 +0200 Subject: [PATCH] test: fix args in parallel/test-fs-null-bytes.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The functions `fs.appendFile()` and `fs.writeFile()` were being called without the required `data` argument. Refs: https://github.com/nodejs/node/issues/11595 Backport-PR-URL: https://github.com/nodejs/node/pull/12477 PR-URL: https://github.com/nodejs/node/pull/11601 Reviewed-By: Michaƫl Zasso Reviewed-By: Nikolai Vavilov Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Yuta Hiroto --- test/parallel/test-fs-null-bytes.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/parallel/test-fs-null-bytes.js b/test/parallel/test-fs-null-bytes.js index fa29e64c9b2382..24d5514eecde75 100644 --- a/test/parallel/test-fs-null-bytes.js +++ b/test/parallel/test-fs-null-bytes.js @@ -22,7 +22,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'); @@ -46,7 +46,7 @@ check(null, fs.unwatchFile, 'foo\u0000bar', common.fail); check(fs.utimes, fs.utimesSync, 'foo\u0000bar', 0, 0); check(null, fs.watch, 'foo\u0000bar', common.fail); check(null, fs.watchFile, 'foo\u0000bar', common.fail); -check(fs.writeFile, fs.writeFileSync, 'foo\u0000bar'); +check(fs.writeFile, fs.writeFileSync, 'foo\u0000bar', 'abc'); // an 'error' for exists means that it doesn't exist. // one of many reasons why this file is the absolute worst.