mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-14 08:16:24 +01:00
io-channel test: Add coverage for g_io_channel_set_line_term(., ., -1)
Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
5dc8b0014c
commit
63f37f8c3b
@ -49,8 +49,10 @@ test_read_line_embedded_nuls (void)
|
||||
channel = g_io_channel_new_file (filename, "r", &local_error);
|
||||
g_assert_no_error (local_error);
|
||||
|
||||
/* Only break on newline characters, not nuls. */
|
||||
g_io_channel_set_line_term (channel, "\n", 1);
|
||||
/* Only break on newline characters, not nuls.
|
||||
* Use length -1 here to exercise glib#2323; the case where length > 0
|
||||
* is covered in glib/tests/protocol.c. */
|
||||
g_io_channel_set_line_term (channel, "\n", -1);
|
||||
g_io_channel_set_encoding (channel, NULL, &local_error);
|
||||
g_assert_no_error (local_error);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user