| 368 | } |
| 369 | |
| 370 | function test_non_symlinks(realpath, realpathSync, callback) { |
| 371 | console.log('test_non_symlinks'); |
| 372 | const entrydir = path.dirname(tmpAbsDir); |
| 373 | const entry = `${tmpAbsDir.slice(entrydir.length + 1)}/cycles/root.js`; |
| 374 | const expected = `${tmpAbsDir}/cycles/root.js`; |
| 375 | const origcwd = process.cwd(); |
| 376 | process.chdir(entrydir); |
| 377 | assertEqualPath(realpathSync(entry), path.resolve(expected)); |
| 378 | asynctest(realpath, [entry], callback, function(err, result) { |
| 379 | process.chdir(origcwd); |
| 380 | assertEqualPath(result, path.resolve(expected)); |
| 381 | return true; |
| 382 | }); |
| 383 | } |
| 384 | |
| 385 | const upone = path.join(process.cwd(), '..'); |
| 386 | function test_escape_cwd(realpath, realpathSync, cb) { |