fix lex tests maybe

v1.18.x
yariplus 8 years ago
parent 472dd007d8
commit af2122bdb9

@ -582,7 +582,7 @@ module.exports = function (db, module) {
sortedSetLex(key, min, max, 1, start, count, callback);
};
module.getSortedSetRevRangeByLex = function (key, min, max, start, count, callback) {
module.getSortedSetRevRangeByLex = function (key, max, min, start, count, callback) {
sortedSetLex(key, min, max, -1, start, count, callback);
};
@ -599,7 +599,7 @@ module.exports = function (db, module) {
count = 0;
}
var query = {_key: key, value: {}};
var query = {_key: key};
if (min !== '-') {
if (min.match(/^\(/)) {

@ -302,7 +302,9 @@ module.exports = function (redisClient, module) {
module.sortedSetRemoveRangeByLex = function (key, min, max, callback) {
callback = callback || helpers.noop;
sortedSetLex('zremrangebylex', false, key, min, max, callback);
sortedSetLex('zremrangebylex', false, key, min, max, function (err) {
callback(err);
});
};
module.sortedSetLexCount = function (key, min, max, callback) {

@ -19,7 +19,7 @@ describe('Sorted Set methods', function () {
db.sortedSetAdd('sortedSetTest3', [2, 4], ['value2', 'value4'], next);
},
function (next) {
db.sortedSetAdd('sortedSetLex', [0, 0, 0, 0], ['a', 'b', 'c', 'd'], done);
db.sortedSetAdd('sortedSetLex', [0, 0, 0, 0], ['a', 'b', 'c', 'd'], next);
}
], done);
});

Loading…
Cancel
Save