summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorLuigi Pinca <luigipinca@gmail.com>2020-04-05 15:14:51 +0200
committerAnna Henningsen <anna@addaleax.net>2020-04-07 20:34:16 +0200
commit2f53eb46e86443ed86f0e69044e420f3e7082f56 (patch)
tree4089e976b74ac2ab25de36f1be03d4b4c6c3f285 /test
parent8c12a08de56dde4e31f68c0a6944379dd8206dc8 (diff)
downloadnode-new-2f53eb46e86443ed86f0e69044e420f3e7082f56.tar.gz
test: save test file in temporary directory
The readv_sync.txt test file is currenly saved in the root directory. Save it in the dedicated temporary directory. PR-URL: https://github.com/nodejs/node/pull/32670 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/parallel/test-fs-readv-sync.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/parallel/test-fs-readv-sync.js b/test/parallel/test-fs-readv-sync.js
index f5bb448f92..92aa2fb681 100644
--- a/test/parallel/test-fs-readv-sync.js
+++ b/test/parallel/test-fs-readv-sync.js
@@ -3,6 +3,7 @@
require('../common');
const assert = require('assert');
const fs = require('fs');
+const path = require('path');
const tmpdir = require('../common/tmpdir');
tmpdir.refresh();
@@ -12,7 +13,7 @@ const expected = 'ümlaut. Лорем 運務ホソモ指及 आपको कर
const exptectedBuff = Buffer.from(expected);
const expectedLength = exptectedBuff.length;
-const filename = 'readv_sync.txt';
+const filename = path.join(tmpdir.path, 'readv_sync.txt');
fs.writeFileSync(filename, exptectedBuff);
const allocateEmptyBuffers = (combinedLength) => {