diff options
author | Rich Trott <rtrott@gmail.com> | 2016-01-30 21:27:25 -0800 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2016-02-02 08:51:54 -0800 |
commit | 352173b3bbaa09adc402b07107f1d00ae86c739f (patch) | |
tree | 0c2a99b3e15f886d576346b6b59b9d36fb4635b8 /test/parallel/test-path.js | |
parent | 7caeda26c8fc1ae01a6e9481f258dfd91117b89e (diff) | |
download | node-new-352173b3bbaa09adc402b07107f1d00ae86c739f.tar.gz |
test: fix redeclared test-path vars
PR-URL: https://github.com/nodejs/node/pull/4991
Reviewed-By: Michaël Zasso <mic.besace@gmail.com>
Reviewed-By: Roman Klauke <romaaan.git@gmail.com>
Reviewed-By: Johan Bergström <bugs@bergstroem.nu>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/parallel/test-path.js')
-rw-r--r-- | test/parallel/test-path.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/parallel/test-path.js b/test/parallel/test-path.js index c13b8d4efd..e8c2820535 100644 --- a/test/parallel/test-path.js +++ b/test/parallel/test-path.js @@ -304,9 +304,10 @@ assert.equal(path.posix.normalize('a//b//./c'), 'a/b/c'); assert.equal(path.posix.normalize('a//b//.'), 'a/b'); // path.resolve tests +var resolveTests; if (common.isWindows) { // windows - var resolveTests = + resolveTests = // arguments result [[['c:/blah\\blah', 'd:/games', 'c:../a'], 'c:\\blah\\a'], [['c:/ignore', 'd:\\a/b\\c/d', '\\e.exe'], 'd:\\e.exe'], @@ -322,7 +323,7 @@ if (common.isWindows) { ]; } else { // Posix - var resolveTests = + resolveTests = // arguments result [[['/var/lib', '../', 'file/'], '/var/file'], [['/var/lib', '/../', 'file/'], '/file'], @@ -330,7 +331,7 @@ if (common.isWindows) { [['.'], process.cwd()], [['/some/dir', '.', '/absolute/'], '/absolute']]; } -var failures = []; +failures = []; resolveTests.forEach(function(test) { var actual = path.resolve.apply(path, test[0]); var expected = test[1]; @@ -358,9 +359,10 @@ assert.equal(path.posix.isAbsolute('bar/'), false); assert.equal(path.posix.isAbsolute('./baz'), false); // path.relative tests +var relativeTests; if (common.isWindows) { // windows - var relativeTests = + relativeTests = // arguments result [['c:/blah\\blah', 'd:/games', 'd:\\games'], ['c:/aaaa/bbbb', 'c:/aaaa', '..'], @@ -372,7 +374,7 @@ if (common.isWindows) { ['c:/aaaa/bbbb', 'd:\\', 'd:\\']]; } else { // posix - var relativeTests = + relativeTests = // arguments result [['/var/lib', '/var', '..'], ['/var/lib', '/bin', '../../bin'], @@ -381,7 +383,7 @@ if (common.isWindows) { ['/var/', '/var/lib', 'lib'], ['/', '/var/lib', 'var/lib']]; } -var failures = []; +failures = []; relativeTests.forEach(function(test) { var actual = path.relative(test[0], test[1]); var expected = test[2]; |