[glib: 4/16] tests: Fix non-TAP output from socket test




commit 75a39114d82af44711f4647e6af700bffa4b8ec1
Author: Philip Withnall <pwithnall endlessos org>
Date:   Tue Jun 14 15:23:21 2022 +0100

    tests: Fix non-TAP output from socket test
    
    This was breaking strict TAP parsers, such as Meson’s.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 gio/tests/socket.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/gio/tests/socket.c b/gio/tests/socket.c
index ca81f9350b..c1c1bcf41e 100644
--- a/gio/tests/socket.c
+++ b/gio/tests/socket.c
@@ -2052,14 +2052,14 @@ test_credentials_tcp_client (void)
   if (creds != NULL)
     {
       gchar *str = g_credentials_to_string (creds);
-      g_print ("Supported on this OS: %s\n", str);
+      g_test_message ("Supported on this OS: %s", str);
       g_free (str);
       g_clear_object (&creds);
     }
   else
     {
       g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED);
-      g_print ("Unsupported on this OS: %s\n", error->message);
+      g_test_message ("Unsupported on this OS: %s", error->message);
       g_clear_error (&error);
     }
 
@@ -2118,14 +2118,14 @@ test_credentials_tcp_server (void)
   if (creds != NULL)
     {
       gchar *str = g_credentials_to_string (creds);
-      g_print ("Supported on this OS: %s\n", str);
+      g_test_message ("Supported on this OS: %s", str);
       g_free (str);
       g_clear_object (&creds);
     }
   else
     {
       g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED);
-      g_print ("Unsupported on this OS: %s\n", error->message);
+      g_test_message ("Unsupported on this OS: %s", error->message);
       g_clear_error (&error);
     }
 
@@ -2321,14 +2321,14 @@ test_credentials_unix_socketpair (void)
   if (creds != NULL)
     {
       gchar *str = g_credentials_to_string (creds);
-      g_print ("Supported on this OS: %s\n", str);
+      g_test_message ("Supported on this OS: %s", str);
       g_free (str);
       g_clear_object (&creds);
     }
   else
     {
       g_assert_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED);
-      g_print ("Unsupported on this OS: %s\n", error->message);
+      g_test_message ("Unsupported on this OS: %s", error->message);
       g_clear_error (&error);
     }
 


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