From ed2652f04cfcdf9478bd7e1707818c96839004dc Mon Sep 17 00:00:00 2001 From: Joffrey F Date: Sun, 17 Feb 2013 17:37:52 -0800 Subject: [PATCH] Added reproduction test for #344 in test.js --- test.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test.js b/test.js index 3596d94f18..526d005c44 100644 --- a/test.js +++ b/test.js @@ -614,6 +614,15 @@ tests.detect_buffers = function () { assert.strictEqual("", reply[0].inspect(), name); assert.strictEqual("", reply[1].inspect(), name); }); + + // array of strings with undefined values (repro #344) + detect_client.hmget("hash key 2", "key 3", "key 4", function(err, reply) { + assert.strictEqual(null, err, name); + assert.strictEqual(true, Array.isArray(reply), name); + assert.strictEqual(2, reply.length, name); + assert.equal(null, reply[0], name); + assert.equal(null, reply[1], name); + }); // Object of Buffers or Strings detect_client.hgetall("hash key 2", function (err, reply) {