0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/fixtures
Jason Ginchereau 0f2f8efdde path: fallback to process cwd when resolving drive cwd
The `path.resolve()` function when given just a drive letter such as
"C:" tries to get a drive-specific CWD, but that isn't available in
cases when the process is not launched via cmd.exe and the process
CWD has not been explicitly set on that drive.

This change adds a fallback to the process CWD, if the process CWD
happens to be on the resolved drive letter. If the process CWD is on
another drive, then a drive-specific CWD cannot be resolved and
defaults to the drive's root as before.

Based on experimentation, the fixed behavior matches that of other
similar path resolution implementations on Windows I checked: .NET's
`System.IO.Path.GetFullPath()` and Python's `os.path.abspath()`.

In the automated path test cases the issue doesn't occur when the
tests are run normally from cmd.exe. But it did cause an assertion
when running the tests from PowerShell, that is fixed by this change.

PR-URL: https://github.com/nodejs/node/pull/8541
Fixes: https://github.com/nodejs/node/issues/7215
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2016-09-24 01:14:56 +03:00
..
b
break-in-module
clustered-server test: refactor test-debug-signal-cluster 2016-08-29 18:53:29 -07:00
cycles
empty
global
internal-modules
json-with-directory-name-module
keys
module-load-order
module-require
module-require-depth
module-require-symlink
nested-index
node_modules
packages
require-bin
syntax
test-init-index
test-init-native
uncaught-exceptions
.empty-repl-history-file
.node_repl_history
a1.js
a.js
agent.crt
agent.key
alice.crt
baz.js
breakpoints_utf8.js
breakpoints.js
catch-stdout-error.js
cert.pem
child_process_should_emit_error.js
child-process-message-and-exit.js
child-process-persistent.js
child-process-spawn-node.js
cluster-preload-test.js
cluster-preload.js
create-file.js
crypto-timing-safe-equal-benchmark-func.js test: make crypto.timingSafeEqual test less flaky 2016-09-11 21:06:10 -07:00
debug-target.js
debug-uncaught-async.js test: increase _debugger coverage 2016-09-06 22:47:15 -07:00
debug-uncaught.js test: add uncaught exception test for debugger 2016-08-15 22:13:00 -07:00
debugger-repeat-last.js
debugger-util-regression-fixture.js
define-global.js
deprecated-userland-class.js util: fix deprecated class prototype 2016-08-17 18:27:22 -07:00
deprecated-userland-function.js
deprecated-userland-subclass.js util: support classes in util.deprecate() 2016-08-04 11:44:40 -04:00
deprecated.js
destroy-stdin.js
dherror.pem
doc_inc_1.md
doc_inc_2.md
doc_with_includes.md
doc_with_yaml.md
echo-close-check.js
echo.js
elipses.txt
empty.js
empty.txt
exit.js
exports-function-with-param.js
file-to-read-with-bom.txt test: ensure stream preprocessing order 2016-07-27 13:56:55 +02:00
file-to-read-without-bom.txt test: ensure stream preprocessing order 2016-07-27 13:56:55 +02:00
fixture.ini
foafssl.crt
foafssl.key
foo
GH-892-request.js
GH-1899-output.js
google_ssl_hello.bin
invalid.json
is-object.js
listen-on-socket-and-exit.js
loop.js inspector: introduce a smoke test 2016-09-19 12:40:16 -07:00
module-loading-error.node
msca.pem
multi-alice.crt
net-fd-passing-receiver.js
not-main-module.js
old-repl-history-file.json
openssl_fips_disabled.cnf
openssl_fips_enabled.cnf
order_of_end_tags_5873.md
parent-process-nonpersistent.js
pass-cert.pem
pass-csr.pem
pass-key.pem
path-resolve.js path: fallback to process cwd when resolving drive cwd 2016-09-24 01:14:56 +03:00
path.js
person.jpg
person.jpg.gz
print-10-lines.js
print-chars-from-buffer.js
print-chars.js
printA.js
printB.js
printC.js
pseudo-multimember-gzip.gz
pseudo-multimember-gzip.z
recvfd.js
registerExt2.test
registerExt.hello.world
registerExt.test
sample_document.md
sample.png
semicolon.js
should_exit.js
spkac.fail
spkac.pem
spkac.valid
stdio-filter.js
test_bad_rsa_privkey.pem
test_ca.pem
test_cert.pem
test_cert.pfx
test_dsa_params.pem
test_dsa_privkey_encrypted.pem
test_dsa_privkey.pem
test_dsa_pubkey.pem
test_key.pem
test_rsa_privkey_2.pem
test_rsa_privkey_encrypted.pem
test_rsa_privkey.pem
test_rsa_pubkey_2.pem
test_rsa_pubkey.pem
test-error-first-line-offset.js
test-fs-readfile-error.js Revert "fs: make callback mandatory to all async functions" 2016-08-05 00:13:29 +02:00
test-regress-GH-4015.js
throws_error1.js
throws_error2.js
throws_error3.js
throws_error4.js
throws_error5.js
throws_error6.js
throws_error7.js
throws_error.js
tick-processor-base.js test: make test-tick-processor.js non-flaky 2016-09-16 14:17:49 +02:00
tls-session-ticket.txt
url-tests.json
utf8-bom.js
utf8-bom.json
vm-run-in-debug-context.js
warnings.js
x1024.txt
x.txt