isaacs
65242abc3b
Fix fs.realpath tests so that they actually run
13 years ago
isaacs
131a67e7ef
Fix #3394 fs.realpath: Properly cache symlink targets
13 years ago
Ben Noordhuis
6f96e78dea
test: fs.realpath() should not call its callback twice
Test case for #2045 .
13 years ago
Ryan Dahl
850609ea2d
Remove separation of libuv tests
13 years ago
Ben Noordhuis
018e110cd1
test: replace .addListener() calls with .on()
13 years ago
Ryan Dahl
4e1d6fca8e
Mark tests which are broken in libuv
13 years ago
Ryan Dahl
55048cdf79
Update copyright headers
14 years ago
isaacs
9bed5dcb2c
Support caching for realpath, use in module load
This adds support for a cache object to be passed to the
fs.realpath and fs.realpathSync functions. The Module loader keeps an
object around which caches the resulting realpaths that it looks up in
the process of loading modules.
This means that (at least as a result of loading modules) the same files
and folders are never lstat()ed more than once. To reset the cache, set
require("module")._realpathCache to an empty object. To disable the
caching behavior, set it to null.
14 years ago
isaacs
47c40bf18d
test-fs-realpath: Put junk in tmp, not fixtures.
Prevents test/fixtures/cycles/folder/cycles from being created every time
the tests are run.
14 years ago
isaacs
dc2b4b2a81
test-fs-realpath: move absDir fetching to separate function
14 years ago
isaacs
6525c04522
test-fs-realpath: lint
14 years ago
Ryan Dahl
a0159b4b29
Fix global leaks
14 years ago
Ryan Dahl
105501c195
test-fs-realpath: Don't ceate things in /tmp; use tmpDir
14 years ago
isaacs
987cbbc191
Handle cyclic links smarter in fs.realpath
Rather than aborting in the face of *any* repeated link in a given path,
instead only abort if such a cycle actually makes a given path unresolvable.
Test for this by doing a normal stat. Still use the seenLinks object to
cache link contents so as to cut own a little bit on readlink calls.
Also add a pathological test that fails without the change to fs.js.
14 years ago
Ryan Dahl
83ff473d30
Use child_process.exec rather than sys.exec
14 years ago
isaacs
686d9f9cc6
Bug in realpath with symlinks to absolute folder paths which have children.
Found by Cliffano Subagio
http://groups.google.com/group/nodejs/browse_thread/thread/f46f093938265ac0/387e14da08c7dd7b ?
14 years ago
Ryan Dahl
3a9570386a
Fix fs.realpathSync('/')
14 years ago
isaacs
ba0c32e2e1
Fix issue #262 . Allow fs.realpath to traverse above the current working directory.
14 years ago
Herbert Vojčík
cf2b206a8e
More changes to tests so they really work under context module loader.
Plus, getting rid of test/common.js defining things in global.
14 years ago
Ryan Dahl
9fd5e3c89c
Update tests to work with module contexts
14 years ago
Blake Mizerany
8c8534046c
fix whitespace errors
15 years ago
Ryan Dahl
ba792ea202
:%s/sys.puts/console.log/g
and there was much rejoicing
15 years ago
isaacs
5861db8a69
Remove process.mixin dependency from all tests.
15 years ago
Felix Geisendörfer
44dde5f24c
Remove fs/path globals from test suite
It is way too easy to not notice bugs due to those modules being
exported as globals while running the test suite.
See: http://github.com/ry/node/issues#issue/75
15 years ago
Rasmus Andersson
5c602b750a
Rewrote realpath implementation solving all known failing tests (also added a bunch of new test cases)
15 years ago
Rasmus Andersson
20d5963fae
Added fs.realpath and fs.realpathSync (pure javascript versions)
15 years ago