From 0c1c8cab83b6f5468123ba28a94ce23f297e426c Mon Sep 17 00:00:00 2001 From: bobrik Date: Sat, 15 Oct 2011 17:07:40 +0400 Subject: [PATCH] added test for optional callbacks --- test.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test.js b/test.js index d909fae..9fcacb2 100644 --- a/test.js +++ b/test.js @@ -1175,6 +1175,20 @@ tests.TTL = function () { }, 500); }; +tests.OPTIONAL_CALLBACK = function() { + var name = "OPTIONAL_CALLBACK"; + client.del("op_cb1"); + client.set("op_cb1", "x"); + client.get("op_cb1", last(name, require_string("x", name))); +}; + +tests.OPTIONAL_CALLBACK_UNDEFINED = function() { + var name = "OPTIONAL_CALLBACK_UNDEFINED"; + client.del("op_cb2"); + client.set("op_cb2", "y", undefined); + client.get("op_cb2", last(name, require_string("y", name))); +} + all_tests = Object.keys(tests); all_start = new Date(); test_count = 0;