@@ -6,8 +6,6 @@ var join = require('path').join;
66
77var filename = join ( common . tmpDir , 'append.txt' ) ;
88
9- common . error ( 'appending to ' + filename ) ;
10-
119var currentFileData = 'ABCD' ;
1210
1311var n = 220 ;
@@ -28,11 +26,9 @@ fs.appendFile(filename, s, function(e) {
2826 if ( e ) throw e ;
2927
3028 ncallbacks ++ ;
31- common . error ( 'appended to file' ) ;
3229
3330 fs . readFile ( filename , function ( e , buffer ) {
3431 if ( e ) throw e ;
35- common . error ( 'file read' ) ;
3632 ncallbacks ++ ;
3733 assert . equal ( Buffer . byteLength ( s ) , buffer . length ) ;
3834 } ) ;
@@ -46,11 +42,9 @@ fs.appendFile(filename2, s, function(e) {
4642 if ( e ) throw e ;
4743
4844 ncallbacks ++ ;
49- common . error ( 'appended to file2' ) ;
5045
5146 fs . readFile ( filename2 , function ( e , buffer ) {
5247 if ( e ) throw e ;
53- common . error ( 'file2 read' ) ;
5448 ncallbacks ++ ;
5549 assert . equal ( Buffer . byteLength ( s ) + currentFileData . length , buffer . length ) ;
5650 } ) ;
@@ -61,17 +55,14 @@ var filename3 = join(common.tmpDir, 'append3.txt');
6155fs . writeFileSync ( filename3 , currentFileData ) ;
6256
6357var buf = new Buffer ( s , 'utf8' ) ;
64- common . error ( 'appending to ' + filename3 ) ;
6558
6659fs . appendFile ( filename3 , buf , function ( e ) {
6760 if ( e ) throw e ;
6861
6962 ncallbacks ++ ;
70- common . error ( 'appended to file3' ) ;
7163
7264 fs . readFile ( filename3 , function ( e , buffer ) {
7365 if ( e ) throw e ;
74- common . error ( 'file3 read' ) ;
7566 ncallbacks ++ ;
7667 assert . equal ( buf . length + currentFileData . length , buffer . length ) ;
7768 } ) ;
@@ -81,14 +72,11 @@ fs.appendFile(filename3, buf, function(e) {
8172var filename4 = join ( common . tmpDir , 'append4.txt' ) ;
8273fs . writeFileSync ( filename4 , currentFileData ) ;
8374
84- common . error ( 'appending to ' + filename4 ) ;
85-
8675var m = 0o600 ;
8776fs . appendFile ( filename4 , n , { mode : m } , function ( e ) {
8877 if ( e ) throw e ;
8978
9079 ncallbacks ++ ;
91- common . error ( 'appended to file4' ) ;
9280
9381 // windows permissions aren't unix
9482 if ( ! common . isWindows ) {
@@ -98,15 +86,13 @@ fs.appendFile(filename4, n, { mode: m }, function(e) {
9886
9987 fs . readFile ( filename4 , function ( e , buffer ) {
10088 if ( e ) throw e ;
101- common . error ( 'file4 read' ) ;
10289 ncallbacks ++ ;
10390 assert . equal ( Buffer . byteLength ( '' + n ) + currentFileData . length ,
10491 buffer . length ) ;
10592 } ) ;
10693} ) ;
10794
10895process . on ( 'exit' , function ( ) {
109- common . error ( 'done' ) ;
11096 assert . equal ( 8 , ncallbacks ) ;
11197
11298 fs . unlinkSync ( filename ) ;
0 commit comments