(realpath, realpathSync, callback)
| 126 | } |
| 127 | |
| 128 | function test_simple_absolute_symlink(realpath, realpathSync, callback) { |
| 129 | console.log('test_simple_absolute_symlink'); |
| 130 | |
| 131 | // This one should still run, even if skipSymlinks is set, |
| 132 | // because it uses a junction. |
| 133 | const type = skipSymlinks ? 'junction' : 'dir'; |
| 134 | |
| 135 | console.log('using type=%s', type); |
| 136 | |
| 137 | const entry = `${tmpAbsDir}/symlink`; |
| 138 | const expected = fixtures.path('nested-index', 'one'); |
| 139 | [ |
| 140 | [entry, expected], |
| 141 | ].forEach(function(t) { |
| 142 | try { fs.unlinkSync(t[0]); } catch { |
| 143 | // Continue regardless of error. |
| 144 | } |
| 145 | console.error('fs.symlinkSync(%j, %j, %j)', t[1], t[0], type); |
| 146 | fs.symlinkSync(t[1], t[0], type); |
| 147 | unlink.push(t[0]); |
| 148 | }); |
| 149 | const result = realpathSync(entry); |
| 150 | assertEqualPath(result, path.resolve(expected)); |
| 151 | asynctest(realpath, [entry], callback, function(err, result) { |
| 152 | assertEqualPath(result, path.resolve(expected)); |
| 153 | }); |
| 154 | } |
| 155 | |
| 156 | function test_deep_relative_file_symlink(realpath, realpathSync, callback) { |
| 157 | console.log('test_deep_relative_file_symlink'); |
nothing calls this directly
no test coverage detected
searching dependent graphs…