[glib] Test a few more GIOChannel functions



commit 6109db27aec99f456c5bbda27bd4afe851b5bcff
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Oct 8 12:42:41 2011 -0400

    Test a few more GIOChannel functions

 glib/tests/protocol.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/glib/tests/protocol.c b/glib/tests/protocol.c
index 4d8f63f..4f888a8 100644
--- a/glib/tests/protocol.c
+++ b/glib/tests/protocol.c
@@ -164,6 +164,9 @@ test_message (void)
   g_io_channel_set_encoding (channel, NULL, NULL);
   g_io_channel_set_buffered (channel, FALSE);
   g_io_channel_set_flags (channel, G_IO_FLAG_NONBLOCK, NULL);
+  g_assert (g_io_channel_get_line_term (channel, NULL) == NULL);
+  g_io_channel_set_line_term (channel, "\n", 1);
+  g_assert_cmpstr (g_io_channel_get_line_term (channel, NULL), ==, "\n");
 
   io_source = g_io_add_watch (channel, G_IO_IN, test_message_cb1, tlb);
   child_source = g_child_watch_add (pid, test_message_cb2, loop);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]