(realpath, realpathSync, cb)
| 407 | // `-- d -> .. |
| 408 | // realpath(a/b/e/d/a/b/e/d/a) ==> a |
| 409 | function test_up_multiple(realpath, realpathSync, cb) { |
| 410 | console.error('test_up_multiple'); |
| 411 | if (skipSymlinks) { |
| 412 | common.printSkipMessage('symlink test (no privs)'); |
| 413 | return cb(); |
| 414 | } |
| 415 | const tmpdir = require('../common/tmpdir'); |
| 416 | tmpdir.refresh(); |
| 417 | fs.mkdirSync(tmp('a'), 0o755); |
| 418 | fs.mkdirSync(tmp('a/b'), 0o755); |
| 419 | fs.symlinkSync('..', tmp('a/d'), 'dir'); |
| 420 | unlink.push(tmp('a/d')); |
| 421 | fs.symlinkSync('..', tmp('a/b/e'), 'dir'); |
| 422 | unlink.push(tmp('a/b/e')); |
| 423 | |
| 424 | const abedabed = tmp('abedabed'.split('').join('/')); |
| 425 | const abedabed_real = tmp(''); |
| 426 | |
| 427 | const abedabeda = tmp('abedabeda'.split('').join('/')); |
| 428 | const abedabeda_real = tmp('a'); |
| 429 | |
| 430 | assertEqualPath(realpathSync(abedabeda), abedabeda_real); |
| 431 | assertEqualPath(realpathSync(abedabed), abedabed_real); |
| 432 | |
| 433 | realpath(abedabeda, common.mustSucceed((real) => { |
| 434 | assertEqualPath(abedabeda_real, real); |
| 435 | realpath(abedabed, common.mustSucceed((real) => { |
| 436 | assertEqualPath(abedabed_real, real); |
| 437 | cb(); |
| 438 | })); |
| 439 | })); |
| 440 | } |
| 441 | |
| 442 | |
| 443 | // Going up with .. multiple times with options = null |
nothing calls this directly
no test coverage detected
searching dependent graphs…