tests/mem_functions.cc
/* Check the validity of chinese key*/
Check the validity of chinese key
Check the validity of chinese key
static test_return_t user_supplied_bug17(memcached_st *memc)
{
    const char *key= "豆瓣";
    const char *value="我们在炎热抑郁的夏天无法停止豆瓣";
    memcached_return_t rc= memcached_set(memc, key, strlen(key),
                                         value, strlen(value),
                                         (time_t)0, 0);
    test_compare(MEMCACHED_SUCCESS, rc);
    size_t length;
    uint32_t flags;
    char *value2= memcached_get(memc, key, strlen(key),
                                &length, &flags, &rc);
    test_true(length==strlen(value));
    test_compare(MEMCACHED_SUCCESS, rc);
    test_memcmp(value, value2, length);
    free(value2);
    return TEST_SUCCESS;
}
static test_return_t user_supplied_bug17 ( memcached_st * memc ) { const char * key = " const char * value = " memcached_return_t rc = memcached_set ( memc , key , strlen ( key ) , value , strlen ( value ) , ( time_t ) 0 , 0 ) ; test_compare ( MEMCACHED_SUCCESS , rc ) ; size_t length ; uint32_t flags ; char * value2 = memcached_get ( memc , key , strlen ( key ) , & length , & flags , & rc ) ; test_true ( length == strlen ( value ) ) ; test_compare ( MEMCACHED_SUCCESS , rc ) ; test_memcmp ( value , value2 , length ) ; free ( value2 ) ; return TEST_SUCCESS ; }
Check the validity of chinese key
Check the validity of chinese key