mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-31 06:13:29 +02:00
Bug 540461 – g_memory_output_stream_get_data_size() doesn't behave as
2009-02-26 Alexander Larsson <alexl@redhat.com> Bug 540461 – g_memory_output_stream_get_data_size() doesn't behave as document * gmemoryoutputstream.c: Track actual valid size, even if we later seek back. * tests/memory-output-stream.c: Add testcase svn path=/trunk/; revision=7916
This commit is contained in:
committed by
Alexander Larsson
parent
1ab68f9ee9
commit
b89e432e8d
@@ -72,6 +72,15 @@ test_data_size (void)
|
||||
pos = g_seekable_tell (G_SEEKABLE (mo));
|
||||
g_assert_cmpint (pos, ==, 1);
|
||||
|
||||
g_test_bug ("540461");
|
||||
|
||||
g_seekable_seek (G_SEEKABLE (mo), 0, G_SEEK_SET, NULL, NULL);
|
||||
pos = g_seekable_tell (G_SEEKABLE (mo));
|
||||
g_assert_cmpint (pos, ==, 0);
|
||||
|
||||
pos = g_memory_output_stream_get_data_size (G_MEMORY_OUTPUT_STREAM (mo));
|
||||
g_assert_cmpint (pos, ==, 1);
|
||||
|
||||
g_object_unref (o);
|
||||
g_object_unref (mo);
|
||||
}
|
||||
|
Reference in New Issue
Block a user