Skip to content

Commit 51fb884

Browse files
Trottrvagg
authored andcommitted
test: fix redeclared test-path vars
PR-URL: #4991 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Roman Klauke <[email protected]> Reviewed-By: Johan Bergström <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent b16b360 commit 51fb884

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

‎test/parallel/test-path.js‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -304,9 +304,10 @@ assert.equal(path.posix.normalize('a//b//./c'), 'a/b/c');
304304
assert.equal(path.posix.normalize('a//b//.'),'a/b');
305305

306306
// path.resolve tests
307+
varresolveTests;
307308
if(common.isWindows){
308309
// windows
309-
varresolveTests=
310+
resolveTests=
310311
// arguments result
311312
[[['c:/blah\\blah','d:/games','c:../a'],'c:\\blah\\a'],
312313
[['c:/ignore','d:\\a/b\\c/d','\\e.exe'],'d:\\e.exe'],
@@ -322,15 +323,15 @@ if (common.isWindows){
322323
];
323324
}else{
324325
// Posix
325-
varresolveTests=
326+
resolveTests=
326327
// arguments result
327328
[[['/var/lib','../','file/'],'/var/file'],
328329
[['/var/lib','/../','file/'],'/file'],
329330
[['a/b/c/','../../..'],process.cwd()],
330331
[['.'],process.cwd()],
331332
[['/some/dir','.','/absolute/'],'/absolute']];
332333
}
333-
varfailures=[];
334+
failures=[];
334335
resolveTests.forEach(function(test){
335336
varactual=path.resolve.apply(path,test[0]);
336337
varexpected=test[1];
@@ -358,9 +359,10 @@ assert.equal(path.posix.isAbsolute('bar/'), false);
358359
assert.equal(path.posix.isAbsolute('./baz'),false);
359360

360361
// path.relative tests
362+
varrelativeTests;
361363
if(common.isWindows){
362364
// windows
363-
varrelativeTests=
365+
relativeTests=
364366
// arguments result
365367
[['c:/blah\\blah','d:/games','d:\\games'],
366368
['c:/aaaa/bbbb','c:/aaaa','..'],
@@ -372,7 +374,7 @@ if (common.isWindows){
372374
['c:/aaaa/bbbb','d:\\','d:\\']];
373375
}else{
374376
// posix
375-
varrelativeTests=
377+
relativeTests=
376378
// arguments result
377379
[['/var/lib','/var','..'],
378380
['/var/lib','/bin','../../bin'],
@@ -381,7 +383,7 @@ if (common.isWindows){
381383
['/var/','/var/lib','lib'],
382384
['/','/var/lib','var/lib']];
383385
}
384-
varfailures=[];
386+
failures=[];
385387
relativeTests.forEach(function(test){
386388
varactual=path.relative(test[0],test[1]);
387389
varexpected=test[2];

0 commit comments

Comments
(0)