From a7a70fa986aea1b8993cc4de7fd9fa6064faeb2a Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Sun, 5 Apr 2020 15:14:51 +0200 Subject: [PATCH] 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 Reviewed-By: Yongsheng Zhang Reviewed-By: Anna Henningsen Reviewed-By: Richard Lau Reviewed-By: Rich Trott Reviewed-By: James M Snell --- test/parallel/test-fs-readv-sync.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/parallel/test-fs-readv-sync.js b/test/parallel/test-fs-readv-sync.js index f5bb448f9200f6..92aa2fb6816752 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) => {