Skip to content

Commit 90498e2

Browse files
rspMyles Borins
authored andcommitted
test: skip long path tests on non-Windows
If not running on Windows it skips the long path tests in: * test-fs-long-path.js * test-require-long-path.js Fixes: #2255 PR-URL: #4116 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
1 parent c96eca1 commit 90498e2

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎test/parallel/test-fs-long-path.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ var fs = require('fs');
44
varpath=require('path');
55
varassert=require('assert');
66

7+
if(!common.isWindows){
8+
console.log('1..0 # Skipped: this test is Windows-specific.');
9+
return;
10+
}
11+
712
varsuccesses=0;
813

914
// make a path that will be at least 260 chars long.

‎test/parallel/test-require-long-path.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ const common = require('../common');
33
constfs=require('fs');
44
constpath=require('path');
55

6+
if(!common.isWindows){
7+
console.log('1..0 # Skipped: this test is Windows-specific.');
8+
return;
9+
}
10+
611
// make a path that is more than 260 chars long.
712
constdirNameLen=Math.max(260-common.tmpDir.length,1);
813
constdirName=path.join(common.tmpDir,'x'.repeat(dirNameLen));

0 commit comments

Comments
 (0)