Browse Source

Add test for `GET non-existent-key` case. (issue #267)

gh-pages
Chakrit Wichian 12 years ago
parent
commit
587d4a361b
  1. 11
      test.js

11
test.js

@ -817,12 +817,19 @@ tests.DBSIZE = function () {
client.DBSIZE([], last(name, require_number_pos("DBSIZE")));
};
tests.GET = function () {
var name = "GET";
tests.GET_1 = function () {
var name = "GET_1";
client.set(["get key", "get val"], require_string("OK", name));
client.GET(["get key"], last(name, require_string("get val", name)));
};
tests.GET_2 = function() {
var name = "GET_2";
// tests handling of non-existent keys
client.GET('this_key_shouldnt_exist', last(name, require_null(name)));
};
tests.SET = function () {
var name = "SET";
client.SET(["set key", "set val"], require_string("OK", name));

Loading…
Cancel
Save