Lines Matching refs:realpath

84 function test_simple_error_callback(realpath, realpathSync, cb) {
85 realpath('/this/path/does/not/exist', common.mustCall(function(err, s) {
92 function test_simple_error_cb_with_null_options(realpath, realpathSync, cb) {
93 realpath('/this/path/does/not/exist', null, common.mustCall(function(err, s) {
100 function test_simple_relative_symlink(realpath, realpathSync, callback) {
120 asynctest(realpath, [entry], callback, function(err, result) {
125 function test_simple_absolute_symlink(realpath, realpathSync, callback) {
148 asynctest(realpath, [entry], callback, function(err, result) {
153 function test_deep_relative_file_symlink(realpath, realpathSync, callback) {
182 asynctest(realpath, [entry], callback, function(err, result) {
187 function test_deep_relative_dir_symlink(realpath, realpathSync, callback) {
214 asynctest(realpath, [entry], callback, function(err, result) {
219 function test_cyclic_link_protection(realpath, realpathSync, callback) {
225 const entry = path.join(tmpDir, '/cycles/realpath-3a');
227 [entry, '../cycles/realpath-3b'],
228 [path.join(tmpDir, '/cycles/realpath-3b'), '../cycles/realpath-3c'],
229 [path.join(tmpDir, '/cycles/realpath-3c'), '../cycles/realpath-3a'],
241 realpath, [entry], callback, common.mustCall(function(err, result) {
248 function test_cyclic_link_overprotection(realpath, realpathSync, callback) {
266 asynctest(realpath, [testPath], callback, function(er, res) {
271 function test_relative_input_cwd(realpath, realpathSync, callback) {
281 path.join(`${tmpDir}/cycles/realpath-3a`));
284 [entry, '../cycles/realpath-3b'],
285 [`${tmpDir}/cycles/realpath-3b`, '../cycles/realpath-3c'],
286 [`${tmpDir}/cycles/realpath-3c`, 'root.js'],
303 asynctest(realpath, [entry], callback, function(err, result) {
310 function test_deep_symlink_mix(realpath, realpathSync, callback) {
319 // /tmp/node-test-realpath-f1 -> $tmpDir/node-test-realpath-d1/foo
320 // /tmp/node-test-realpath-d1 -> $tmpDir/node-test-realpath-d2
321 // /tmp/node-test-realpath-d2/foo -> $tmpDir/node-test-realpath-f2
322 // /tmp/node-test-realpath-f2
323 // -> $tmpDir/targets/nested-index/one/realpath-c
324 // $tmpDir/targets/nested-index/one/realpath-c
325 // -> $tmpDir/targets/nested-index/two/realpath-c
326 // $tmpDir/targets/nested-index/two/realpath-c -> $tmpDir/cycles/root.js
329 const entry = tmp('node-test-realpath-f1');
330 try { fs.unlinkSync(tmp('node-test-realpath-d2/foo')); } catch {
333 try { fs.rmdirSync(tmp('node-test-realpath-d2')); } catch {
336 fs.mkdirSync(tmp('node-test-realpath-d2'), 0o700);
339 [entry, `${tmpDir}/node-test-realpath-d1/foo`],
340 [tmp('node-test-realpath-d1'),
341 `${tmpDir}/node-test-realpath-d2`],
342 [tmp('node-test-realpath-d2/foo'), '../node-test-realpath-f2'],
343 [tmp('node-test-realpath-f2'),
344 `${targetsAbsDir}/nested-index/one/realpath-c`],
345 [`${targetsAbsDir}/nested-index/one/realpath-c`,
346 `${targetsAbsDir}/nested-index/two/realpath-c`],
347 [`${targetsAbsDir}/nested-index/two/realpath-c`,
357 unlink.push(tmp('node-test-realpath-d2'));
361 asynctest(realpath, [entry], callback, function(err, result) {
367 function test_non_symlinks(realpath, realpathSync, callback) {
375 asynctest(realpath, [entry], callback, function(err, result) {
383 function test_escape_cwd(realpath, realpathSync, cb) {
385 asynctest(realpath, ['..'], cb, function(er, uponeActual) {
388 `realpath("..") expected: ${path.resolve(upone)} actual:${uponeActual}`);
392 function test_upone_actual(realpath, realpathSync, cb) {
405 // realpath(a/b/e/d/a/b/e/d/a) ==> a
406 function test_up_multiple(realpath, realpathSync, cb) {
430 realpath(abedabeda, function(er, real) {
433 realpath(abedabed, function(er, real) {
448 // realpath(a/b/e/d/a/b/e/d/a) ==> a
449 function test_up_multiple_with_null_options(realpath, realpathSync, cb) {
473 realpath(abedabeda, null, function(er, real) {
476 realpath(abedabed, null, function(er, real) {
490 // `-- link -> /tmp/node-test-realpath-abs-kids/a/b/
491 // realpath(root+'/a/link/c/x.txt') ==> root+'/a/b/c/x.txt'
492 function test_abs_with_kids(realpath, realpathSync, cb) {
501 const root = `${tmpAbsDir}/node-test-realpath-abs-kids`;
540 asynctest(realpath, [linkPath], cb, function(er, actual) {
547 function test_root(realpath, realpathSync, cb) {
549 realpath('/', function(err, result) {
556 function test_root_with_null_options(realpath, realpathSync, cb) {
557 realpath('/', null, function(err, result) {
592 return console.log(`${numtests} subtests completed OK for fs.realpath`);
595 test(fs.realpath, fs.realpathSync, common.mustSucceed(() => {
597 test(fs.realpath.native,