@@ -23,7 +23,7 @@ function check(async, sync) {
2323
2424check ( fs . access , fs . accessSync , 'foo\u0000bar' ) ;
2525check ( fs . access , fs . accessSync , 'foo\u0000bar' , fs . F_OK ) ;
26- check ( fs . appendFile , fs . appendFileSync , 'foo\u0000bar' ) ;
26+ check ( fs . appendFile , fs . appendFileSync , 'foo\u0000bar' , 'abc' ) ;
2727check ( fs . chmod , fs . chmodSync , 'foo\u0000bar' , '0644' ) ;
2828check ( fs . chown , fs . chownSync , 'foo\u0000bar' , 12 , 34 ) ;
2929check ( fs . link , fs . linkSync , 'foo\u0000bar' , 'foobar' ) ;
@@ -47,14 +47,14 @@ check(null, fs.unwatchFile, 'foo\u0000bar', common.mustNotCall());
4747check ( fs . utimes , fs . utimesSync , 'foo\u0000bar' , 0 , 0 ) ;
4848check ( null , fs . watch , 'foo\u0000bar' , common . mustNotCall ( ) ) ;
4949check ( null , fs . watchFile , 'foo\u0000bar' , common . mustNotCall ( ) ) ;
50- check ( fs . writeFile , fs . writeFileSync , 'foo\u0000bar' ) ;
50+ check ( fs . writeFile , fs . writeFileSync , 'foo\u0000bar' , 'abc' ) ;
5151
5252const fileUrl = new URL ( 'file:///C:/foo\u0000bar' ) ;
5353const fileUrl2 = new URL ( 'file:///C:/foo%00bar' ) ;
5454
5555check ( fs . access , fs . accessSync , fileUrl ) ;
5656check ( fs . access , fs . accessSync , fileUrl , fs . F_OK ) ;
57- check ( fs . appendFile , fs . appendFileSync , fileUrl ) ;
57+ check ( fs . appendFile , fs . appendFileSync , fileUrl , 'abc' ) ;
5858check ( fs . chmod , fs . chmodSync , fileUrl , '0644' ) ;
5959check ( fs . chown , fs . chownSync , fileUrl , 12 , 34 ) ;
6060check ( fs . link , fs . linkSync , fileUrl , 'foobar' ) ;
@@ -78,11 +78,11 @@ check(null, fs.unwatchFile, fileUrl, common.fail);
7878check ( fs . utimes , fs . utimesSync , fileUrl , 0 , 0 ) ;
7979check ( null , fs . watch , fileUrl , common . fail ) ;
8080check ( null , fs . watchFile , fileUrl , common . fail ) ;
81- check ( fs . writeFile , fs . writeFileSync , fileUrl ) ;
81+ check ( fs . writeFile , fs . writeFileSync , fileUrl , 'abc' ) ;
8282
8383check ( fs . access , fs . accessSync , fileUrl2 ) ;
8484check ( fs . access , fs . accessSync , fileUrl2 , fs . F_OK ) ;
85- check ( fs . appendFile , fs . appendFileSync , fileUrl2 ) ;
85+ check ( fs . appendFile , fs . appendFileSync , fileUrl2 , 'abc' ) ;
8686check ( fs . chmod , fs . chmodSync , fileUrl2 , '0644' ) ;
8787check ( fs . chown , fs . chownSync , fileUrl2 , 12 , 34 ) ;
8888check ( fs . link , fs . linkSync , fileUrl2 , 'foobar' ) ;
@@ -106,7 +106,7 @@ check(null, fs.unwatchFile, fileUrl2, common.fail);
106106check ( fs . utimes , fs . utimesSync , fileUrl2 , 0 , 0 ) ;
107107check ( null , fs . watch , fileUrl2 , common . fail ) ;
108108check ( null , fs . watchFile , fileUrl2 , common . fail ) ;
109- check ( fs . writeFile , fs . writeFileSync , fileUrl2 ) ;
109+ check ( fs . writeFile , fs . writeFileSync , fileUrl2 , 'abc' ) ;
110110
111111// an 'error' for exists means that it doesn't exist.
112112// one of many reasons why this file is the absolute worst.
0 commit comments