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: https://github.com/nodejs/node/issues/2255
PR-URL: https://github.com/nodejs/node/pull/4116
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Minwoo Jung <jmwsoft@gmail.com>
This commit is contained in:
Rafał Pocztarski authored and Ben Noordhuis committed 2015-12-07 12:10:24 +01:00
1 parent 95dd890b32
commit 19e06d71cf
2 files changed
+10

No files matched your search

+5
View File
@@ -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.
+5
View File
@@ -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));