From: Stephan Bosch Date: Sun, 25 Feb 2018 17:38:23 +0000 (+0100) Subject: lib-program-client: test-program-client-unix: Properly recognize the noreply script... X-Git-Tag: 2.3.9~2090 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81f430edc671b1a38c3389b6d84fe2f2c9e48e30;p=thirdparty%2Fdovecot%2Fcore.git lib-program-client: test-program-client-unix: Properly recognize the noreply script protocol option. Somehow the equivalent test-program-client-net code does not have this problem. And somehow this test did not fail before. --- diff --git a/src/lib-program-client/test-program-client-unix.c b/src/lib-program-client/test-program-client-unix.c index 60841270ad..d62028b860 100644 --- a/src/lib-program-client/test-program-client-unix.c +++ b/src/lib-program-client/test-program-client-unix.c @@ -78,7 +78,7 @@ static void test_program_client_destroy(struct test_client **_client) static int test_program_input_handle(struct test_client *client, const char *line) { - int cmp; + int cmp = -1; const char *arg; switch(client->state) { @@ -90,7 +90,10 @@ test_program_input_handle(struct test_client *client, const char *line) return -1; break; case CLIENT_STATE_VERSION: - test_assert((cmp = strcmp(line, "-")) == 0); + if (strcmp(line, "noreply") == 0 || + strcmp(line, "-") == 0) + cmp = 0; + test_assert(cmp == 0); if (cmp == 0) client->state = CLIENT_STATE_ARGS; else