diff options
author | Jason Ginchereau <jasongin@microsoft.com> | 2016-09-13 12:06:10 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2016-09-20 09:56:50 -0700 |
commit | c1e47ed8c883afba3c240e89d763a28a57ec1373 (patch) | |
tree | caea3252704eef64cfc4a42597cb0bc075118f00 /test/parallel/test-path.js | |
parent | 0f7fffb329ff522ba77cb1e98637ee54a498f186 (diff) | |
download | android-node-v8-c1e47ed8c883afba3c240e89d763a28a57ec1373.tar.gz android-node-v8-c1e47ed8c883afba3c240e89d763a28a57ec1373.tar.bz2 android-node-v8-c1e47ed8c883afba3c240e89d763a28a57ec1373.zip |
path: fix path.relative UNC path result
When the result of a path.relative() is an absolute UNC path, it should
include the leading backslashes.
Fixes: https://github.com/nodejs/node/issues/8444
PR-URL: https://github.com/nodejs/node/pull/8523
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Bartosz Sosnowski <bartosz@janeasystems.com>
Diffstat (limited to 'test/parallel/test-path.js')
-rw-r--r-- | test/parallel/test-path.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/parallel/test-path.js b/test/parallel/test-path.js index 5aa60eb7c6..cc6b302df4 100644 --- a/test/parallel/test-path.js +++ b/test/parallel/test-path.js @@ -492,7 +492,9 @@ const relativeTests = [ ['C:\\baz-quux', 'C:\\baz', '..\\baz'], ['C:\\baz', 'C:\\baz-quux', '..\\baz-quux'], ['\\\\foo\\baz-quux', '\\\\foo\\baz', '..\\baz'], - ['\\\\foo\\baz', '\\\\foo\\baz-quux', '..\\baz-quux'] + ['\\\\foo\\baz', '\\\\foo\\baz-quux', '..\\baz-quux'], + ['C:\\baz', '\\\\foo\\bar\\baz', '\\\\foo\\bar\\baz'], + ['\\\\foo\\bar\\baz', 'C:\\baz', 'C:\\baz'] ] ], [ path.posix.relative, |