From 93156a60570fe4932bbc13a97b4c7ef0a791b7f4 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 2 Mar 2013 02:43:01 +0100 Subject: [PATCH] test: unlink temp file at test start The file has a long name that's apparently impossible to remove with `git clean` on Windows. --- test/simple/test-fs-long-path.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/simple/test-fs-long-path.js b/test/simple/test-fs-long-path.js index 82691556a6e..67f042976e8 100644 --- a/test/simple/test-fs-long-path.js +++ b/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