@@ -6,8 +6,6 @@ var join = require('path').join;
6
6
7
7
var filename = join ( common . tmpDir , 'append.txt' ) ;
8
8
9
- common . error ( 'appending to ' + filename ) ;
10
-
11
9
var currentFileData = 'ABCD' ;
12
10
13
11
var n = 220 ;
@@ -28,11 +26,9 @@ fs.appendFile(filename, s, function(e) {
28
26
if ( e ) throw e ;
29
27
30
28
ncallbacks ++ ;
31
- common . error ( 'appended to file' ) ;
32
29
33
30
fs . readFile ( filename , function ( e , buffer ) {
34
31
if ( e ) throw e ;
35
- common . error ( 'file read' ) ;
36
32
ncallbacks ++ ;
37
33
assert . equal ( Buffer . byteLength ( s ) , buffer . length ) ;
38
34
} ) ;
@@ -46,11 +42,9 @@ fs.appendFile(filename2, s, function(e) {
46
42
if ( e ) throw e ;
47
43
48
44
ncallbacks ++ ;
49
- common . error ( 'appended to file2' ) ;
50
45
51
46
fs . readFile ( filename2 , function ( e , buffer ) {
52
47
if ( e ) throw e ;
53
- common . error ( 'file2 read' ) ;
54
48
ncallbacks ++ ;
55
49
assert . equal ( Buffer . byteLength ( s ) + currentFileData . length , buffer . length ) ;
56
50
} ) ;
@@ -61,17 +55,14 @@ var filename3 = join(common.tmpDir, 'append3.txt');
61
55
fs . writeFileSync ( filename3 , currentFileData ) ;
62
56
63
57
var buf = new Buffer ( s , 'utf8' ) ;
64
- common . error ( 'appending to ' + filename3 ) ;
65
58
66
59
fs . appendFile ( filename3 , buf , function ( e ) {
67
60
if ( e ) throw e ;
68
61
69
62
ncallbacks ++ ;
70
- common . error ( 'appended to file3' ) ;
71
63
72
64
fs . readFile ( filename3 , function ( e , buffer ) {
73
65
if ( e ) throw e ;
74
- common . error ( 'file3 read' ) ;
75
66
ncallbacks ++ ;
76
67
assert . equal ( buf . length + currentFileData . length , buffer . length ) ;
77
68
} ) ;
@@ -81,14 +72,11 @@ fs.appendFile(filename3, buf, function(e) {
81
72
var filename4 = join ( common . tmpDir , 'append4.txt' ) ;
82
73
fs . writeFileSync ( filename4 , currentFileData ) ;
83
74
84
- common . error ( 'appending to ' + filename4 ) ;
85
-
86
75
var m = 0o600 ;
87
76
fs . appendFile ( filename4 , n , { mode : m } , function ( e ) {
88
77
if ( e ) throw e ;
89
78
90
79
ncallbacks ++ ;
91
- common . error ( 'appended to file4' ) ;
92
80
93
81
// windows permissions aren't unix
94
82
if ( ! common . isWindows ) {
@@ -98,15 +86,13 @@ fs.appendFile(filename4, n, { mode: m }, function(e) {
98
86
99
87
fs . readFile ( filename4 , function ( e , buffer ) {
100
88
if ( e ) throw e ;
101
- common . error ( 'file4 read' ) ;
102
89
ncallbacks ++ ;
103
90
assert . equal ( Buffer . byteLength ( '' + n ) + currentFileData . length ,
104
91
buffer . length ) ;
105
92
} ) ;
106
93
} ) ;
107
94
108
95
process . on ( 'exit' , function ( ) {
109
- common . error ( 'done' ) ;
110
96
assert . equal ( 8 , ncallbacks ) ;
111
97
112
98
fs . unlinkSync ( filename ) ;
0 commit comments