]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-json: test-json-istream - Fix string stream error assertions
authorStephan Bosch <stephan.bosch@open-xchange.com>
Tue, 21 Nov 2023 12:42:29 +0000 (13:42 +0100)
committerStephan Bosch <stephan.bosch@open-xchange.com>
Mon, 27 Nov 2023 20:19:16 +0000 (21:19 +0100)
src/lib-json/test-json-istream.c

index ba32014b70566ea27e74f67ffea7a9a91646a1f6..03365b98b1cc36b4d87aed2c5897880926227acc 100644 (file)
@@ -2960,8 +2960,8 @@ static void test_json_istream_read_stream(void)
                }
                if (ret < 0) {
                        test_assert(!i_stream_have_bytes_left(val_input));
+                       test_assert_cmp(val_input->stream_errno, ==, 0);
                        i_stream_unref(&val_input);
-                       ret = 0;
                }
        }
        test_out_quiet("stream output", strcmp(str_c(buffer), str_text) == 0);
@@ -3108,8 +3108,8 @@ static void test_json_istream_read_stream(void)
                }
                if (ret < 0) {
                        test_assert(!i_stream_have_bytes_left(val_input));
+                       test_assert_cmp(val_input->stream_errno, ==, 0);
                        i_stream_unref(&val_input);
-                       ret = 0;
                }
        }
        test_out_quiet("stream output", strcmp(str_c(buffer), str_text) == 0);