1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-07 13:22:56 +03:00

Use first word of multi word commands

Close #363.

Signed-off-by: DTrejo <david.daniel.trejo@gmail.com>
This commit is contained in:
Jonas Dohse
2013-01-10 15:35:15 +00:00
committed by DTrejo
parent 938c0526a0
commit f0ae6642f9
3 changed files with 28 additions and 1 deletions

16
test.js
View File

@@ -406,6 +406,22 @@ tests.EVAL_1 = function () {
}
};
tests.SCRIPT_LOAD = function() {
if (server_version_at_least(bclient, [2, 5, 0])) {
var name = "SCRIPT_LOAD",
command = "return 1",
commandSha = crypto.createHash('sha1').update(command).digest('hex');
bclient.script("load", command, function(err, result) {
assert.strictEqual(result.toString(), commandSha);
next(name);
});
} else {
console.log("Skipping " + name + " because server version isn't new enough.");
next(name);
}
};
tests.WATCH_MULTI = function () {
var name = 'WATCH_MULTI', multi;