Browse Source

test: unlink temp file at test start

The file has a long name that's apparently impossible to remove with
`git clean` on Windows.
v0.9.12-release
Ben Noordhuis 12 years ago
parent
commit
93156a6057
  1. 7
      test/simple/test-fs-long-path.js

7
test/simple/test-fs-long-path.js

@ -31,6 +31,13 @@ var fileNameLen = Math.max(260 - common.tmpDir.length - 1, 1);
var fileName = path.join(common.tmpDir, new Array(fileNameLen + 1).join('x'));
var fullPath = path.resolve(fileName);
try {
fs.unlinkSync(fullPath);
}
catch (e) {
// Ignore.
}
console.log({
filenameLength: fileName.length,
fullPathLength: fullPath.length

Loading…
Cancel
Save