diff options
author | Scott Blomquist <sblom@microsoft.com> | 2013-03-18 10:48:13 -0700 |
---|---|---|
committer | Scott Blomquist <sblom@microsoft.com> | 2013-03-19 09:38:11 -0700 |
commit | a05f973f82d2be8527aad4c371d40d3c7e4c564e (patch) | |
tree | de763c645f14269287e48a3ec861dad81f160d22 /lib/path.js | |
parent | 14a8fb8bbe906b20ee393b67c1425773e0e0f7db (diff) | |
download | android-node-v8-a05f973f82d2be8527aad4c371d40d3c7e4c564e.tar.gz android-node-v8-a05f973f82d2be8527aad4c371d40d3c7e4c564e.tar.bz2 android-node-v8-a05f973f82d2be8527aad4c371d40d3c7e4c564e.zip |
test: Misc Windows unit test fixes
Fixes #5071, #5073.
* Normalize capitalization of drive letter
* Fix `exit()` typo in failure path
* Ignore symlink tests (Windows) if not elevated
The `test_relative_input_cwd()` test was failing on Windows when
`skipSymlinks` was `true`. So we won't run it if `skipSymlinks` is
`true`.
When it failed, the unhandled error caused Node to die before
having a chance to clean up, which resulted in two files missing
in subsequent unit tests:
* `test/fixtures/nested-index/one/hello.js`
* `test/fixtures/nested-index/one/index.js`
We should probably find a way to isolate this test from the other
test (`simple/test-module-loading`) that was failing when this test
poluted the disk state.
Diffstat (limited to 'lib/path.js')
-rw-r--r-- | lib/path.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/path.js b/lib/path.js index da0f8bee68..db0cdea2dd 100644 --- a/lib/path.js +++ b/lib/path.js @@ -176,6 +176,11 @@ if (isWindows) { tail = result[3], trailingSlash = /[\\\/]$/.test(tail); + // If device is a drive letter, we'll normalize to lower case. + if (device && device.charAt(1) === ':') { + device = device[0].toLowerCase() + device.substr(1); + } + // Normalize the tail path tail = normalizeArray(tail.split(/[\\\/]+/).filter(function(p) { return !!p; |