From 5ba30067904e497c9672122b67c27043e6b1139c Mon Sep 17 00:00:00 2001 From: Ulf Jaenicke-Roessler Date: Sun, 24 Apr 2022 16:40:42 +0200 Subject: [PATCH] add test for start position --- test/test-sftp.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test-sftp.js b/test/test-sftp.js index 1bda7668..65e33479 100644 --- a/test/test-sftp.js +++ b/test/test-sftp.js @@ -105,10 +105,12 @@ setup('read (overflow)', mustCall((client, server) => { if (reqs === 3) server.end(); }, 3)); - client.read(handle_, buf, 0, buf.length, 0, mustCall((err, nb) => { + let reqPos = 0 + client.read(handle_, buf, 0, buf.length, reqPos, mustCall((err, nb, retBuf, retPos) => { assert(!err, `Unexpected read() error: ${err}`); assert.deepStrictEqual(buf, expected); assert.strictEqual(nb, buf.length, 'read nb mismatch'); + assert.strictEqual(reqPos, retPos, 'read ressource position does not match request'); })); }));