(realpath, realpathSync, callback)
| 249 | } |
| 250 | |
| 251 | function test_cyclic_link_overprotection(realpath, realpathSync, callback) { |
| 252 | console.log('test_cyclic_link_overprotection'); |
| 253 | if (skipSymlinks) { |
| 254 | common.printSkipMessage('symlink test (no privs)'); |
| 255 | return callback(); |
| 256 | } |
| 257 | const cycles = `${tmpDir}/cycles`; |
| 258 | const expected = realpathSync(cycles); |
| 259 | const folder = `${cycles}/folder`; |
| 260 | const link = `${folder}/cycles`; |
| 261 | let testPath = cycles; |
| 262 | testPath += '/folder/cycles'.repeat(10); |
| 263 | try { fs.unlinkSync(link); } catch { |
| 264 | // Continue regardless of error. |
| 265 | } |
| 266 | fs.symlinkSync(cycles, link, 'dir'); |
| 267 | unlink.push(link); |
| 268 | assertEqualPath(realpathSync(testPath), path.resolve(expected)); |
| 269 | asynctest(realpath, [testPath], callback, function(er, res) { |
| 270 | assertEqualPath(res, path.resolve(expected)); |
| 271 | }); |
| 272 | } |
| 273 | |
| 274 | function test_relative_input_cwd(realpath, realpathSync, callback) { |
| 275 | console.log('test_relative_input_cwd'); |
nothing calls this directly
no test coverage detected