Skip to content

Commit

Permalink
test: skip long path tests on non-Windows
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Minwoo Jung <[email protected]>
  • Loading branch information
rsp authored and bnoordhuis committed Dec 7, 2015
1 parent 95dd890 commit 19e06d7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/parallel/test-fs-long-path.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ var fs = require('fs');
var path = require('path');
var assert = require('assert');

if (!common.isWindows) {
console.log('1..0 # Skipped: this test is Windows-specific.');
return;
}

var successes = 0;

// make a path that will be at least 260 chars long.
Expand Down
5 changes: 5 additions & 0 deletions test/parallel/test-require-long-path.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ const common = require('../common');
const fs = require('fs');
const path = require('path');

if (!common.isWindows) {
console.log('1..0 # Skipped: this test is Windows-specific.');
return;
}

// make a path that is more than 260 chars long.
const dirNameLen = Math.max(260 - common.tmpDir.length, 1);
const dirName = path.join(common.tmpDir, 'x'.repeat(dirNameLen));
Expand Down

0 comments on commit 19e06d7

Please sign in to comment.