(realpath, realpathSync, callback)
| 101 | } |
| 102 | |
| 103 | function test_simple_relative_symlink(realpath, realpathSync, callback) { |
| 104 | console.log('test_simple_relative_symlink'); |
| 105 | if (skipSymlinks) { |
| 106 | common.printSkipMessage('symlink test (no privs)'); |
| 107 | return callback(); |
| 108 | } |
| 109 | const entry = `${tmpDir}/symlink`; |
| 110 | const expected = `${tmpDir}/cycles/root.js`; |
| 111 | [ |
| 112 | [entry, `../${path.basename(tmpDir)}/cycles/root.js`], |
| 113 | ].forEach(function(t) { |
| 114 | try { fs.unlinkSync(t[0]); } catch { |
| 115 | // Continue regardless of error. |
| 116 | } |
| 117 | console.log('fs.symlinkSync(%j, %j, %j)', t[1], t[0], 'file'); |
| 118 | fs.symlinkSync(t[1], t[0], 'file'); |
| 119 | unlink.push(t[0]); |
| 120 | }); |
| 121 | const result = realpathSync(entry); |
| 122 | assertEqualPath(result, path.resolve(expected)); |
| 123 | asynctest(realpath, [entry], callback, function(err, result) { |
| 124 | assertEqualPath(result, path.resolve(expected)); |
| 125 | }); |
| 126 | } |
| 127 | |
| 128 | function test_simple_absolute_symlink(realpath, realpathSync, callback) { |
| 129 | console.log('test_simple_absolute_symlink'); |
nothing calls this directly
no test coverage detected