X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=tests%2Fmemcapable.cc;h=c8adad18153a5dabde1ea04a795ed0cec95f0b4e;hb=81a0c9a7b94f27a20fab8fa60ec22e97b128ec94;hp=7adf763561a11c134ba5b20119e5553f7049ac47;hpb=f652bb663f0499f5447d0358670464a669a199f0;p=awesomized%2Flibmemcached diff --git a/tests/memcapable.cc b/tests/memcapable.cc index 7adf7635..c8adad18 100644 --- a/tests/memcapable.cc +++ b/tests/memcapable.cc @@ -52,11 +52,17 @@ using namespace libtest; static std::string executable; +static test_return_t quiet_test(void *) +{ + const char *args[]= { "-q", 0 }; + + test_true(exec_cmdline(executable, args)); + return TEST_SUCCESS; +} + static test_return_t help_test(void *) { - char buffer[1024]; - snprintf(buffer, sizeof(buffer), "-p %d", int(default_port())); - const char *args[]= { buffer, "--help", 0 }; + const char *args[]= { "-q", "--help", 0 }; test_true(exec_cmdline(executable, args)); return TEST_SUCCESS; @@ -66,7 +72,7 @@ static test_return_t ascii_test(void *) { char buffer[1024]; snprintf(buffer, sizeof(buffer), "-p %d", int(default_port())); - const char *args[]= { buffer, " -a ", 0 }; + const char *args[]= { "-q", buffer, " -a ", 0 }; test_true(exec_cmdline(executable, args)); return TEST_SUCCESS; @@ -76,13 +82,14 @@ static test_return_t binary_test(void *) { char buffer[1024]; snprintf(buffer, sizeof(buffer), "-p %d", int(default_port())); - const char *args[]= { buffer, " -b ", 0 }; + const char *args[]= { "-q", buffer, " -b ", 0 }; test_true(exec_cmdline(executable, args)); return TEST_SUCCESS; } test_st memcapable_tests[] ={ + {"--quiet", 0, quiet_test}, {"--help", 0, help_test}, {"-a, ascii", 0, ascii_test}, {"-b, binary", 0, binary_test}, @@ -98,7 +105,7 @@ static void *world_create(server_startup_st& servers, test_return_t& error) { if (HAVE_MEMCACHED_BINARY == 0) { - error= TEST_FATAL; + error= TEST_SKIPPED; return NULL; }