void TestSclientSetname(){ CRedisClient redis; redis.connect( "127.0.0.1", 6379 ); cout << "------test clientSetname------" << endl; redis.clientSetname(""); TestServerPrint("redis.clientSetname(qwert)","OK"); }
void TestSclientGetname(){ CRedisClient redis; redis.connect( "127.0.0.1", 6379 ); cout << "------test clientGetname------" << endl; string cName; if ( redis.clientGetname(cName)) TestServerPrint("redis.clientGetname()",cName); else std::cout<<"no clientName"<<std::endl; redis.clientSetname(""); if ( redis.clientGetname(cName)) TestServerPrint("redis.clientGetname()",cName); else std::cout<<"no clientName"<<std::endl; }