Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add test for KEYS that have spaces

  • Loading branch information...
commit c0ef7d6330ea44cf1dfb184bd8649e8040430dc6 1 parent 22e63ab
@fictorial fictorial authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 test/test.js
View
12 test/test.js
@@ -447,6 +447,18 @@ function testKEYS() {
redisclient.convertMultiBulkBuffersToUTF8Strings(keys);
checkDeepEqual(keys.sort(), ['boo'], "testKEYS");
});
+
+ // Now try a key with a space in it.
+ // At this point we have keys: foo1, foo2, baz, boo, a key is this
+
+ client.set('a key is this', 'whatever', expectOK("testKEYS"))
+
+ client.keys('*', function (err, keys) {
+ if (err) assert.fail(err, "testKEYS");
+ checkEqual(keys.length, 5, "testKEYS");
+ redisclient.convertMultiBulkBuffersToUTF8Strings(keys);
+ checkDeepEqual(keys.sort(), ['a key is this', 'baz', 'boo', 'foo1', 'foo2'], "testKEYS");
+ });
}
function testRANDOMKEY() {
Please sign in to comment.
Something went wrong with that request. Please try again.