]> git.ipfire.org Git - pakfire.git/commitdiff
tests: log stream: Stream another line
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 22 Mar 2025 16:39:24 +0000 (16:39 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 22 Mar 2025 16:39:24 +0000 (16:39 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
tests/libpakfire/log_stream.c

index e19eae3faaa73e21c0b52e436d317d3168d6cd6e..98acbbc69024069fcdbce12f2b99d9ed16854bad 100644 (file)
@@ -126,6 +126,16 @@ static int test_pty(const struct test* t) {
        ASSERT(pakfire_log_stream_pty(t->ctx, stream, "\n", strlen("\n")) == 1);
        ASSERT_EQUALS(lines_read, 1);
 
+       // Write a second line
+       ASSERT(pakfire_log_stream_pty(t->ctx, stream, "D", strlen("D")) == 1);
+       ASSERT_EQUALS(lines_read, 1);
+       ASSERT(pakfire_log_stream_pty(t->ctx, stream, "E", strlen("E")) == 1);
+       ASSERT_EQUALS(lines_read, 1);
+       ASSERT(pakfire_log_stream_pty(t->ctx, stream, "F", strlen("F")) == 1);
+       ASSERT_EQUALS(lines_read, 1);
+       ASSERT(pakfire_log_stream_pty(t->ctx, stream, "\n", strlen("\n")) == 1);
+       ASSERT_EQUALS(lines_read, 2);
+
        // Everything passed
        r = EXIT_SUCCESS;