summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Griffis <pgriffis@igalia.com>2021-11-24 12:14:53 -0600
committerPatrick Griffis <pgriffis@igalia.com>2021-11-24 14:32:02 -0600
commit67ea293d2a80061f90c729e6f853bf88c8780b0f (patch)
treeeef32f1745e9ed3108c7effa30bf6071a186a0a9
parente7f842c35e97e9dd2d96445b90fc64c0ba871244 (diff)
downloadlibsoup-67ea293d2a80061f90c729e6f853bf88c8780b0f.tar.gz
tests: Fix brotli test comparing non-NUL-terminated data as a string
-rw-r--r--tests/brotli-decompressor-test.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/brotli-decompressor-test.c b/tests/brotli-decompressor-test.c
index 9b9b2f37..6a72c055 100644
--- a/tests/brotli-decompressor-test.c
+++ b/tests/brotli-decompressor-test.c
@@ -54,6 +54,9 @@ test_brotli (void)
g_assert_cmpint (result, ==, G_CONVERTER_FINISHED);
+ /* NUL terminate data so we can cmpstr below. */
+ g_byte_array_append (out_bytes, (const guint8*)"\0", 1);
+
g_free (contents);
g_assert_true (g_file_get_contents (uncompressed_filename, &contents, &length, NULL));
g_assert_cmpstr ((char*)out_bytes->data, ==, contents);