@@ -87,7 +87,7 @@ function test_simple_relative_symlink(callback) {
87
87
[
88
88
[ entry , '../' + common . tmpDirName + '/cycles/root.js' ]
89
89
] . forEach ( function ( t ) {
90
- try { fs . unlinkSync ( t [ 0 ] ) ; } catch ( e ) { }
90
+ try { fs . unlinkSync ( t [ 0 ] ) ; } catch ( e ) { }
91
91
console . log ( 'fs.symlinkSync(%j, %j, %j)' , t [ 1 ] , t [ 0 ] , 'file' ) ;
92
92
fs . symlinkSync ( t [ 1 ] , t [ 0 ] , 'file' ) ;
93
93
unlink . push ( t [ 0 ] ) ;
@@ -113,7 +113,7 @@ function test_simple_absolute_symlink(callback) {
113
113
[
114
114
[ entry , expected ]
115
115
] . forEach ( function ( t ) {
116
- try { fs . unlinkSync ( t [ 0 ] ) ; } catch ( e ) { }
116
+ try { fs . unlinkSync ( t [ 0 ] ) ; } catch ( e ) { }
117
117
console . error ( 'fs.symlinkSync(%j, %j, %j)' , t [ 1 ] , t [ 0 ] , type ) ;
118
118
fs . symlinkSync ( t [ 1 ] , t [ 0 ] , type ) ;
119
119
unlink . push ( t [ 0 ] ) ;
@@ -138,13 +138,13 @@ function test_deep_relative_file_symlink(callback) {
138
138
expected ) ;
139
139
const linkPath1 = path . join ( targetsAbsDir ,
140
140
'nested-index' , 'one' , 'symlink1.js' ) ;
141
- try { fs . unlinkSync ( linkPath1 ) ; } catch ( e ) { }
141
+ try { fs . unlinkSync ( linkPath1 ) ; } catch ( e ) { }
142
142
fs . symlinkSync ( linkData1 , linkPath1 , 'file' ) ;
143
143
144
144
const linkData2 = '../one/symlink1.js' ;
145
145
const entry = path . join ( targetsAbsDir ,
146
146
'nested-index' , 'two' , 'symlink1-b.js' ) ;
147
- try { fs . unlinkSync ( entry ) ; } catch ( e ) { }
147
+ try { fs . unlinkSync ( entry ) ; } catch ( e ) { }
148
148
fs . symlinkSync ( linkData2 , entry , 'file' ) ;
149
149
unlink . push ( linkPath1 ) ;
150
150
unlink . push ( entry ) ;
@@ -165,13 +165,13 @@ function test_deep_relative_dir_symlink(callback) {
165
165
const path1b = path . join ( targetsAbsDir , 'nested-index' , 'one' ) ;
166
166
const linkPath1b = path . join ( path1b , 'symlink1-dir' ) ;
167
167
const linkData1b = path . relative ( path1b , expected ) ;
168
- try { fs . unlinkSync ( linkPath1b ) ; } catch ( e ) { }
168
+ try { fs . unlinkSync ( linkPath1b ) ; } catch ( e ) { }
169
169
fs . symlinkSync ( linkData1b , linkPath1b , 'dir' ) ;
170
170
171
171
const linkData2b = '../one/symlink1-dir' ;
172
172
const entry = path . join ( targetsAbsDir ,
173
173
'nested-index' , 'two' , 'symlink12-dir' ) ;
174
- try { fs . unlinkSync ( entry ) ; } catch ( e ) { }
174
+ try { fs . unlinkSync ( entry ) ; } catch ( e ) { }
175
175
fs . symlinkSync ( linkData2b , entry , 'dir' ) ;
176
176
unlink . push ( linkPath1b ) ;
177
177
unlink . push ( entry ) ;
@@ -195,7 +195,7 @@ function test_cyclic_link_protection(callback) {
195
195
[ common . tmpDir + '/cycles/realpath-3b' , '../cycles/realpath-3c' ] ,
196
196
[ common . tmpDir + '/cycles/realpath-3c' , '../cycles/realpath-3a' ]
197
197
] . forEach ( function ( t ) {
198
- try { fs . unlinkSync ( t [ 0 ] ) ; } catch ( e ) { }
198
+ try { fs . unlinkSync ( t [ 0 ] ) ; } catch ( e ) { }
199
199
fs . symlinkSync ( t [ 1 ] , t [ 0 ] , 'dir' ) ;
200
200
unlink . push ( t [ 0 ] ) ;
201
201
} ) ;
@@ -218,7 +218,7 @@ function test_cyclic_link_overprotection(callback) {
218
218
const link = folder + '/cycles' ;
219
219
var testPath = cycles ;
220
220
testPath += '/folder/cycles' . repeat ( 10 ) ;
221
- try { fs . unlinkSync ( link ) ; } catch ( ex ) { }
221
+ try { fs . unlinkSync ( link ) ; } catch ( ex ) { }
222
222
fs . symlinkSync ( cycles , link , 'dir' ) ;
223
223
unlink . push ( link ) ;
224
224
assertEqualPath ( fs . realpathSync ( testPath ) , path . resolve ( expected ) ) ;
@@ -246,7 +246,7 @@ function test_relative_input_cwd(callback) {
246
246
] . forEach ( function ( t ) {
247
247
const fn = t [ 0 ] ;
248
248
console . error ( 'fn=%j' , fn ) ;
249
- try { fs . unlinkSync ( fn ) ; } catch ( e ) { }
249
+ try { fs . unlinkSync ( fn ) ; } catch ( e ) { }
250
250
const b = path . basename ( t [ 1 ] ) ;
251
251
const type = ( b === 'root.js' ? 'file' : 'dir' ) ;
252
252
console . log ( 'fs.symlinkSync(%j, %j, %j)' , t [ 1 ] , fn , type ) ;
@@ -363,7 +363,7 @@ function test_up_multiple(cb) {
363
363
[ 'a/b' ,
364
364
'a'
365
365
] . forEach ( function ( folder ) {
366
- try { fs . rmdirSync ( tmp ( folder ) ) ; } catch ( ex ) { }
366
+ try { fs . rmdirSync ( tmp ( folder ) ) ; } catch ( ex ) { }
367
367
} ) ;
368
368
}
369
369
function setup ( ) {
@@ -420,14 +420,14 @@ function test_abs_with_kids(cb) {
420
420
[ '/a/b/c/x.txt' ,
421
421
'/a/link'
422
422
] . forEach ( function ( file ) {
423
- try { fs . unlinkSync ( root + file ) ; } catch ( ex ) { }
423
+ try { fs . unlinkSync ( root + file ) ; } catch ( ex ) { }
424
424
} ) ;
425
425
[ '/a/b/c' ,
426
426
'/a/b' ,
427
427
'/a' ,
428
428
''
429
429
] . forEach ( function ( folder ) {
430
- try { fs . rmdirSync ( root + folder ) ; } catch ( ex ) { }
430
+ try { fs . rmdirSync ( root + folder ) ; } catch ( ex ) { }
431
431
} ) ;
432
432
}
433
433
function setup ( ) {
0 commit comments