| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9,13 +9,15 @@ const assert = require('assert'); | |||
| 9 | 9 | const fs = require('fs'); | |
| 10 | 10 | const cp = require('child_process'); | |
| 11 | 11 | const kStringMaxLength = require('buffer').constants.MAX_STRING_LENGTH; | |
| 12 | + const size = Math.floor(kStringMaxLength / 200); | ||
| 13 | + | ||
| 12 | 14 | if (common.isAIX && (Number(cp.execSync('ulimit -f')) * 512) < kStringMaxLength) | |
| 13 | 15 | common.skip('intensive toString tests due to file size confinements'); | |
| 14 | 16 | ||
| 15 | 17 | const tmpdir = require('../common/tmpdir'); | |
| 16 | 18 | tmpdir.refresh(); | |
| 17 | 19 | ||
| 18 | - if (!tmpdir.hasEnoughSpace(kStringMaxLength)) { | ||
| 20 | + if (!tmpdir.hasEnoughSpace(kStringMaxLength + size)) { | ||
| 19 | 21 | common.skip(`Not enough space in ${tmpdir.path}`); | |
| 20 | 22 | } | |
| 21 | 23 | ||
@@ -26,7 +28,6 @@ const stream = fs.createWriteStream(file, { | |||
| 26 | 28 | ||
| 27 | 29 | stream.on('error', (err) => { throw err; }); | |
| 28 | 30 | ||
| 29 | - const size = kStringMaxLength / 200; | ||
| 30 | 31 | const a = Buffer.alloc(size, 'a'); | |
| 31 | 32 | let expectedSize = 0; | |
| 32 | 33 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments