• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1'use strict';
2const common = require('../common');
3if (!common.isWindows)
4  common.skip('this test is Windows-specific.');
5
6const fs = require('fs');
7const path = require('path');
8
9const tmpdir = require('../common/tmpdir');
10
11// Make a path that is more than 260 chars long.
12const dirNameLen = Math.max(260 - tmpdir.path.length, 1);
13const dirName = path.join(tmpdir.path, 'x'.repeat(dirNameLen));
14const fullDirPath = path.resolve(dirName);
15
16const indexFile = path.join(fullDirPath, 'index.js');
17const otherFile = path.join(fullDirPath, 'other.js');
18
19tmpdir.refresh();
20
21fs.mkdirSync(fullDirPath);
22fs.writeFileSync(indexFile, 'require("./other");');
23fs.writeFileSync(otherFile, '');
24
25require(indexFile);
26require(otherFile);
27
28tmpdir.refresh();
29