]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-program-client: test-program-client-* - Use the new test-dir API
authorStephan Bosch <stephan.bosch@open-xchange.com>
Mon, 27 Oct 2025 21:00:13 +0000 (22:00 +0100)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Wed, 5 Nov 2025 10:17:48 +0000 (10:17 +0000)
src/lib-program-client/test-program-client-net.c
src/lib-program-client/test-program-client-unix.c

index b4c588be536c7f64076db5a071eacb56f54e2a1a..190d7698bb5bb9810262619dc527bb5f7080528e 100644 (file)
@@ -97,6 +97,7 @@ static void test_program_client_destroy(struct test_client **_client)
 static int
 test_program_input_handle(struct test_client *client, const char *line)
 {
+       const char *tmp_prefix = test_dir_prepend("program-client-unix.");
        int cmp = -1;
        const char *arg;
 
@@ -131,7 +132,7 @@ test_program_input_handle(struct test_client *client, const char *line)
        case CLIENT_STATE_BODY:
                if (client->os_body == NULL) {
                        client->os_body = iostream_temp_create_named(
-                               ".dovecot.test.", 0, "test_program_input body");
+                               tmp_prefix, 0, "test_program_input body");
                }
                if (client->is_body == NULL)
                        client->is_body = i_stream_create_dot(client->in,
@@ -546,6 +547,7 @@ int main(int argc, char *argv[])
                }
        }
 
+       test_dir_init("program-client-net");
        ret = test_run(tests);
 
        event_unref(&event);
index 849205f826aa721bfde5e0a257308c8222ab53d3..028e29de675fd12be6f1f072a64e22fd96af7ac9 100644 (file)
@@ -79,6 +79,7 @@ static void test_program_client_destroy(struct test_client **_client)
 static int
 test_program_input_handle(struct test_client *client, const char *line)
 {
+       const char *tmp_prefix = test_dir_prepend("program-client-unix.");
        int cmp = -1;
        const char *arg;
 
@@ -113,7 +114,7 @@ test_program_input_handle(struct test_client *client, const char *line)
        case CLIENT_STATE_BODY:
                if (client->os_body == NULL) {
                        client->os_body = iostream_temp_create_named(
-                               ".dovecot.test.", 0, "test_program_input body");
+                               tmp_prefix, 0, "test_program_input body");
                }
                switch (o_stream_send_istream(client->os_body, client->in)) {
                case OSTREAM_SEND_ISTREAM_RESULT_ERROR_OUTPUT:
@@ -495,6 +496,7 @@ int main(int argc, char *argv[])
                }
        }
 
+       test_dir_init("program-client-unix");
        ret = test_run(tests);
 
        event_unref(&event);