X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fmemrm.cc;h=e3c807bec5034d600d465a06dcd5137fae06e0c4;hb=a70063f77b25d8b77ddbc2c145c2b812c31cc01c;hp=1f5f722ac8faf034044ddacb873d7f305225dbcc;hpb=2569efffe16042f47dc5d2c34528a9ec22fc18b0;p=awesomized%2Flibmemcached diff --git a/tests/memrm.cc b/tests/memrm.cc index 1f5f722a..e3c807be 100644 --- a/tests/memrm.cc +++ b/tests/memrm.cc @@ -39,10 +39,10 @@ Test that we are cycling the servers we are creating during testing. */ -#include +#include "mem_config.h" -#include -#include +#include "libtest/test.hpp" +#include "libmemcached-1.0/memcached.h" using namespace libtest; @@ -50,7 +50,7 @@ using namespace libtest; #pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif -static std::string executable("./clients/memrm"); +static std::string executable("./src/bin/memrm"); static test_return_t quiet_test(void *) { @@ -84,6 +84,8 @@ static test_return_t rm_test(void *) test_null(memcached_get(memc, test_literal_param("foo"), 0, 0, &rc)); test_compare(MEMCACHED_SUCCESS, rc); + char memrm_buffer[1024]; + snprintf(memrm_buffer, sizeof(memrm_buffer), "--servers=localhost:%d", int(default_port())); const char *args[]= { buffer, "foo", 0 }; test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true)); @@ -121,7 +123,7 @@ static test_return_t NOT_FOUND_TEST(void *) static test_return_t multiple_NOT_FOUND_TEST(void *) { char buffer[1024]; - snprintf(buffer, sizeof(buffer), "--server=localhost:%d", int(default_port())); + snprintf(buffer, sizeof(buffer), "--servers=localhost:%d", int(default_port())); const char *args[]= { buffer, "protocols", "foo", "mine", "bar", "dog", "cat", "foo", "mine", "eye", "for", "the", "to", "not", "know", "what", "I", "should", "be", "doing", 0 }; @@ -152,7 +154,7 @@ static void *world_create(server_startup_st& servers, test_return_t& error) return NULL; } - if (server_startup(servers, "memcached", libtest::default_port(), 0, NULL) == false) + if (server_startup(servers, "memcached", libtest::default_port(), NULL) == false) { error= TEST_FAILURE; }